Skip to content

Commit 0879aeb

Browse files
authored
Merge pull request #12319 from github/repo-sync
repo sync
2 parents 540c165 + cc73273 commit 0879aeb

4 files changed

Lines changed: 59 additions & 6 deletions

File tree

data/release-notes/enterprise-server/3-0/20.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ sections:
99
- Some critical services may not have been available on backend nodes in GHES Cluster.
1010
changes:
1111
- 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.
12-
- Upgraded collectd to version 5.12.0.
1312
- We have added extra text to the admin console to remind users about the mobile apps' data collection for experience improvement purposes.
1413
known_issues:
1514
- On a freshly set up {% data variables.product.prodname_ghe_server %} without any users, an attacker could create the first admin user.

data/release-notes/enterprise-server/3-1/12.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ sections:
1111
- Some critical services may not have been available on backend nodes in GHES Cluster.
1212
changes:
1313
- 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.
14-
- Upgraded collectd to version 5.12.0.
1514
- We have added extra text to the admin console to remind users about the mobile apps' data collection for experience improvement purposes.
1615
known_issues:
1716
- 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.

data/release-notes/enterprise-server/3-2/4.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ sections:
1616
- User defined patterns would not detect secrets in files like `package.json` or `yarn.lock`.
1717
changes:
1818
- 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.
19-
- Upgraded collectd to version 5.12.0.
2019
- We have added extra text to the admin console to remind users about the mobile apps' data collection for experience improvement purposes.
2120
known_issues:
2221
- On a freshly set up {% data variables.product.prodname_ghe_server %} without any users, an attacker could create the first admin user.

tests/unit/render-content.js

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,70 @@ describe('renderContent', () => {
186186
})
187187

188188
test('does syntax highlighting', async () => {
189-
const template = nl(`
189+
let template = nl(`
190190
\`\`\`js
191191
const example = true
192192
\`\`\`\`
193193
`)
194-
const html = await renderContent(template)
195-
const $ = cheerio.load(html, { xmlMode: true })
194+
let html = await renderContent(template)
195+
let $ = cheerio.load(html, { xmlMode: true })
196196
expect($.html().includes('<pre><code class="hljs language-js">')).toBeTruthy()
197+
expect($.html().includes('<span class="hljs-keyword">const</span>')).toBeTruthy()
198+
199+
template = nl(`
200+
\`\`\`erb
201+
<% @articles.each do |article| %>
202+
\`\`\`\`
203+
`)
204+
html = await renderContent(template)
205+
$ = cheerio.load(html, { xmlMode: true })
206+
expect($.html().includes('<pre><code class="hljs language-erb">')).toBeTruthy()
207+
expect($.html().includes('<span class="hljs-variable">@articles</span>')).toBeTruthy()
208+
209+
template = nl(`
210+
\`\`\`http
211+
POST / HTTP/2
212+
\`\`\`\`
213+
`)
214+
html = await renderContent(template)
215+
$ = cheerio.load(html, { xmlMode: true })
216+
expect($.html().includes('<pre><code class="hljs language-http">')).toBeTruthy()
217+
expect($.html().includes('<span class="hljs-keyword">POST</span>')).toBeTruthy()
218+
219+
template = nl(`
220+
\`\`\`groovy
221+
plugins {
222+
...
223+
id 'maven-publish'
224+
}
225+
\`\`\`\`
226+
`)
227+
html = await renderContent(template)
228+
$ = cheerio.load(html, { xmlMode: true })
229+
expect($.html().includes('<pre><code class="hljs language-groovy">')).toBeTruthy()
230+
expect(
231+
$.html().includes('<span class="hljs-string">&apos;maven-publish&apos;</span>')
232+
).toBeTruthy()
233+
234+
template = nl(`
235+
\`\`\`Dockerfile
236+
FROM alpine:3.10
237+
\`\`\`\`
238+
`)
239+
html = await renderContent(template)
240+
$ = cheerio.load(html, { xmlMode: true })
241+
expect($.html().includes('<pre><code class="hljs language-Dockerfile">')).toBeTruthy()
242+
expect($.html().includes('<span class="hljs-keyword">FROM</span>')).toBeTruthy()
243+
244+
template = nl(`
245+
\`\`\`Powershell
246+
$resourceGroupName = "octocat-testgroup"
247+
\`\`\`\`
248+
`)
249+
html = await renderContent(template)
250+
$ = cheerio.load(html, { xmlMode: true })
251+
expect($.html().includes('<pre><code class="hljs language-Powershell">')).toBeTruthy()
252+
expect($.html().includes('<span class="hljs-variable">$resourceGroupName</span>')).toBeTruthy()
197253
})
198254

199255
test('does not autoguess code block language', async () => {

0 commit comments

Comments
 (0)