File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -250,18 +250,16 @@ class Page {
250
250
} )
251
251
}
252
252
253
- // set a flag so layout knows whether to render a mac/windows/linux switcher element
254
- this . includesPlatformSpecificContent =
255
- html . includes ( 'extended-markdown mac' ) ||
256
- html . includes ( 'extended-markdown windows' ) ||
257
- html . includes ( 'extended-markdown linux' )
258
-
259
253
this . detectedPlatforms = [
260
- html . includes ( 'extended-markdown mac' ) && 'mac' ,
261
- html . includes ( 'extended-markdown windows' ) && 'windows' ,
262
- html . includes ( 'extended-markdown linux' ) && 'linux' ,
254
+ ( html . includes ( 'extended-markdown mac' ) || html . includes ( 'platform-mac' ) ) && 'mac' ,
255
+ ( html . includes ( 'extended-markdown windows' ) || html . includes ( 'platform-windows' ) ) &&
256
+ 'windows' ,
257
+ ( html . includes ( 'extended-markdown linux' ) || html . includes ( 'platform-linux' ) ) && 'linux' ,
263
258
] . filter ( Boolean )
264
259
260
+ // set a flag so layout knows whether to render a mac/windows/linux switcher element
261
+ this . includesPlatformSpecificContent = this . detectedPlatforms . length > 0
262
+
265
263
return html
266
264
}
267
265
You can’t perform that action at this time.
0 commit comments