From 3a8c8276f06298aa80a971bff86ef0c051d679fc Mon Sep 17 00:00:00 2001 From: Brett Westover Date: Wed, 24 Nov 2021 09:02:00 -0800 Subject: [PATCH 1/4] Update 4.yml --- data/release-notes/enterprise-server/3-2/4.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/data/release-notes/enterprise-server/3-2/4.yml b/data/release-notes/enterprise-server/3-2/4.yml index 2fa7bd8a0a25..a6a8c5e566dc 100644 --- a/data/release-notes/enterprise-server/3-2/4.yml +++ b/data/release-notes/enterprise-server/3-2/4.yml @@ -16,7 +16,6 @@ sections: - User defined patterns would not detect secrets in files like `package.json` or `yarn.lock`. changes: - An additional outer layer of `gzip` compression when creating a cluster support bundle with `ghe-cluster-suport-bundle` is now turned off by default. This outer compression can optionally be applied with the `ghe-cluster-suport-bundle -c` command line option. - - Upgraded collectd to version 5.12.0. - We have added extra text to the admin console to remind users about the mobile apps' data collection for experience improvement purposes. known_issues: - On a freshly set up {% data variables.product.prodname_ghe_server %} without any users, an attacker could create the first admin user. From e68c6438f4ca257dea235cf7d863725f4c7fc463 Mon Sep 17 00:00:00 2001 From: Brett Westover Date: Wed, 24 Nov 2021 09:03:14 -0800 Subject: [PATCH 2/4] remove collectd bump --- data/release-notes/enterprise-server/3-1/12.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/data/release-notes/enterprise-server/3-1/12.yml b/data/release-notes/enterprise-server/3-1/12.yml index fb6b8860bc5d..90717317d47e 100644 --- a/data/release-notes/enterprise-server/3-1/12.yml +++ b/data/release-notes/enterprise-server/3-1/12.yml @@ -11,7 +11,6 @@ sections: - Some critical services may not have been available on backend nodes in GHES Cluster. changes: - An additional outer layer of `gzip` compression when creating a cluster support bundle with `ghe-cluster-suport-bundle` is now turned off by default. This outer compression can optionally be applied with the `ghe-cluster-suport-bundle -c` command line option. - - Upgraded collectd to version 5.12.0. - We have added extra text to the admin console to remind users about the mobile apps' data collection for experience improvement purposes. known_issues: - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. From 8a899cd876a62768e5ffd500296f840939235db5 Mon Sep 17 00:00:00 2001 From: Brett Westover Date: Wed, 24 Nov 2021 09:03:47 -0800 Subject: [PATCH 3/4] remove collectd bump --- data/release-notes/enterprise-server/3-0/20.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/data/release-notes/enterprise-server/3-0/20.yml b/data/release-notes/enterprise-server/3-0/20.yml index b83329aaf441..7a22e6eda794 100644 --- a/data/release-notes/enterprise-server/3-0/20.yml +++ b/data/release-notes/enterprise-server/3-0/20.yml @@ -9,7 +9,6 @@ sections: - Some critical services may not have been available on backend nodes in GHES Cluster. changes: - An additional outer layer of `gzip` compression when creating a cluster support bundle with `ghe-cluster-suport-bundle` is now turned off by default. This outer compression can optionally be applied with the `ghe-cluster-suport-bundle -c` command line option. - - Upgraded collectd to version 5.12.0. - We have added extra text to the admin console to remind users about the mobile apps' data collection for experience improvement purposes. known_issues: - On a freshly set up {% data variables.product.prodname_ghe_server %} without any users, an attacker could create the first admin user. From a0042e40a3026d151ccae14a44df3eb992722aac Mon Sep 17 00:00:00 2001 From: Robert Sese Date: Wed, 24 Nov 2021 11:30:29 -0600 Subject: [PATCH 4/4] Add more syntax highlighting tests (#23085) * Add more syntax highlighting tests * Add erb highlighting test * Test JS keyword highlighted --- tests/unit/render-content.js | 62 ++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/tests/unit/render-content.js b/tests/unit/render-content.js index 8d560771b713..f392001df5df 100644 --- a/tests/unit/render-content.js +++ b/tests/unit/render-content.js @@ -186,14 +186,70 @@ describe('renderContent', () => { }) test('does syntax highlighting', async () => { - const template = nl(` + let template = nl(` \`\`\`js const example = true \`\`\`\` `) - const html = await renderContent(template) - const $ = cheerio.load(html, { xmlMode: true }) + let html = await renderContent(template) + let $ = cheerio.load(html, { xmlMode: true }) expect($.html().includes('
')).toBeTruthy()
+    expect($.html().includes('const')).toBeTruthy()
+
+    template = nl(`
+\`\`\`erb
+<% @articles.each do |article| %>
+\`\`\`\`
+    `)
+    html = await renderContent(template)
+    $ = cheerio.load(html, { xmlMode: true })
+    expect($.html().includes('
')).toBeTruthy()
+    expect($.html().includes('@articles')).toBeTruthy()
+
+    template = nl(`
+\`\`\`http
+POST / HTTP/2
+\`\`\`\`
+    `)
+    html = await renderContent(template)
+    $ = cheerio.load(html, { xmlMode: true })
+    expect($.html().includes('
')).toBeTruthy()
+    expect($.html().includes('POST')).toBeTruthy()
+
+    template = nl(`
+\`\`\`groovy
+plugins {
+  ...
+  id 'maven-publish'
+}
+\`\`\`\`
+    `)
+    html = await renderContent(template)
+    $ = cheerio.load(html, { xmlMode: true })
+    expect($.html().includes('
')).toBeTruthy()
+    expect(
+      $.html().includes(''maven-publish'')
+    ).toBeTruthy()
+
+    template = nl(`
+\`\`\`Dockerfile
+FROM alpine:3.10
+\`\`\`\`
+    `)
+    html = await renderContent(template)
+    $ = cheerio.load(html, { xmlMode: true })
+    expect($.html().includes('
')).toBeTruthy()
+    expect($.html().includes('FROM')).toBeTruthy()
+
+    template = nl(`
+\`\`\`Powershell
+$resourceGroupName = "octocat-testgroup"
+\`\`\`\`
+    `)
+    html = await renderContent(template)
+    $ = cheerio.load(html, { xmlMode: true })
+    expect($.html().includes('
')).toBeTruthy()
+    expect($.html().includes('$resourceGroupName')).toBeTruthy()
   })
 
   test('does not autoguess code block language', async () => {