File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -250,18 +250,16 @@ class Page {
250250 } )
251251 }
252252
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-
259253 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' ,
263258 ] . filter ( Boolean )
264259
260+ // set a flag so layout knows whether to render a mac/windows/linux switcher element
261+ this . includesPlatformSpecificContent = this . detectedPlatforms . length > 0
262+
265263 return html
266264 }
267265
You can’t perform that action at this time.
0 commit comments