From 6dbd1c86f4e7db6aefccf40c5bb3297cd77bbf85 Mon Sep 17 00:00:00 2001 From: jmarlena <6732600+jmarlena@users.noreply.github.com> Date: Tue, 16 Nov 2021 14:00:23 -0800 Subject: [PATCH 1/2] Server Statistics early access updates for #5176 (#22711) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * trigger tests * Trigger new build * Trigger new build * Trigger new build * Trigger new build * Trigger new build * Trigger new build * Trigger build * Trigger build * Trigger build * Trigger build Co-authored-by: “jmarlena” <“jmarlena@github.com”> From 9952744db2233c0e184a0d88aa5b1b5480d00507 Mon Sep 17 00:00:00 2001 From: Mike Surowiec Date: Tue, 16 Nov 2021 16:39:09 -0600 Subject: [PATCH 2/2] fix: certain articles not correctly identified as having platform specific content (#22887) --- lib/page.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/page.js b/lib/page.js index 4afc1c6370f4..d16e543ee478 100644 --- a/lib/page.js +++ b/lib/page.js @@ -250,18 +250,16 @@ class Page { }) } - // set a flag so layout knows whether to render a mac/windows/linux switcher element - this.includesPlatformSpecificContent = - html.includes('extended-markdown mac') || - html.includes('extended-markdown windows') || - html.includes('extended-markdown linux') - this.detectedPlatforms = [ - html.includes('extended-markdown mac') && 'mac', - html.includes('extended-markdown windows') && 'windows', - html.includes('extended-markdown linux') && 'linux', + (html.includes('extended-markdown mac') || html.includes('platform-mac')) && 'mac', + (html.includes('extended-markdown windows') || html.includes('platform-windows')) && + 'windows', + (html.includes('extended-markdown linux') || html.includes('platform-linux')) && 'linux', ].filter(Boolean) + // set a flag so layout knows whether to render a mac/windows/linux switcher element + this.includesPlatformSpecificContent = this.detectedPlatforms.length > 0 + return html }