Skip to content

Commit

Permalink
Merge pull request github#31040 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Jan 10, 2024
2 parents f30ba20 + d2f9220 commit 20cfd1e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
25 changes: 9 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
"hast-util-to-string": "^2.0.0",
"hastscript": "^8.0.0",
"helmet": "^7.0.0",
"highlight.js": "11.7.0",
"highlight.js": "11.9.0",
"highlightjs-curl": "^1.3.0",
"hot-shots": "^10.0.0",
"html-entities": "^2.3.3",
Expand All @@ -281,7 +281,7 @@
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"lowdb": "7.0.1",
"lowlight": "3.0.0",
"lowlight": "3.1.0",
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-to-hast": "^13.0.1",
"mdast-util-to-markdown": "2.0.0",
Expand Down
12 changes: 12 additions & 0 deletions src/content-render/unified/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ export function createProcessor(context) {
.use(highlight, {
languages: { ...common, graphql, dockerfile, http, groovy, erb, powershell },
subset: false,
aliases: {
// As of Jan 2024, 'jsonc' is not supported by highlight.js. It
// just because plain text.
// But 'jsonc' works great in github.com. For example, when
// previewing and edited .md content in the browser. Or viewing
// PR diffs in web view.
// So by sticking to 'jsonc' where there's JSON with comments,
// it's technically more correct, looks good in github.com,
// but with this alias you get the nice syntax highlighting when
// viewed on our site.
json: 'jsonc',
},
})
.use(raw)
.use(wrapProceduralImages)
Expand Down

0 comments on commit 20cfd1e

Please sign in to comment.