Skip to content

Commit 147e14f

Browse files
authored
Merge pull request #18259 from github/repo-sync
repo sync
2 parents d5989e1 + cad5a81 commit 147e14f

File tree

3 files changed

+85
-10
lines changed

3 files changed

+85
-10
lines changed

lib/render-content/plugins/code-header.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { h } from 'hastscript'
22
import octicons from '@primer/octicons'
3-
import parse5 from 'parse5'
3+
import { parse } from 'parse5'
44
import { fromParse5 } from 'hast-util-from-parse5'
55

66
const LANGUAGE_MAP = {
@@ -94,7 +94,7 @@ export default function addCodeHeader(node) {
9494
const language = LANGUAGE_MAP[node.lang] || node.lang || 'Code'
9595

9696
const btnIconHtml = octicons.copy.toSVG()
97-
const btnIconAst = parse5.parse(String(btnIconHtml), { sourceCodeLocationInfo: true })
97+
const btnIconAst = parse(String(btnIconHtml), { sourceCodeLocationInfo: true })
9898
const btnIcon = fromParse5(btnIconAst, { file: btnIconHtml })
9999

100100
// Need to create the header using Markdown AST utilities, to fit

package-lock.json

Lines changed: 82 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"msgpack5rpc": "^1.1.0",
6060
"next": "^11.1.3",
6161
"overload-protection": "^1.2.3",
62-
"parse5": "^6.0.1",
62+
"parse5": "7.0.0",
6363
"port-used": "^2.0.8",
6464
"quick-lru": "6.1.1",
6565
"react": "^17.0.2",

0 commit comments

Comments
 (0)