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. 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. 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. 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 () => {