Skip to content

Commit

Permalink
fix(build): fix code groups for line numbers mode (#1700)
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd authored Dec 16, 2022
1 parent a684b67 commit 135b797
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/__tests__/e2e/.vitepress/cache
/coverage
/src/client/shared.ts
/src/node/shared.ts
Expand All @@ -10,6 +9,7 @@
.vite_opt_cache
.vscode
dist
cache
examples-temp
node_modules
pnpm-global
Expand Down
84 changes: 0 additions & 84 deletions docs/test.md

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"@vue/devtools-api": "^6.4.5",
"@vueuse/core": "^9.6.0",
"body-scroll-lock": "4.0.0-beta.0",
"nanoid": "3.3.4",
"shiki": "^0.11.1",
"vite": "^4.0.0",
"vue": "^3.2.45"
Expand Down Expand Up @@ -139,6 +138,7 @@
"markdown-it-emoji": "^2.0.2",
"micromatch": "^4.0.5",
"minimist": "^1.2.7",
"nanoid": "^3.3.4",
"npm-run-all": "^4.1.5",
"ora": "^5.4.1",
"picocolors": "^1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion src/node/markdown/plugins/lineNumbers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const lineNumberPlugin = (md: MarkdownIt) => {

const finalCode = rawCode
.replace(/<\/div>$/, `${lineNumbersWrapperCode}</div>`)
.replace(/"(language-\S*?)"/, '"$1 line-numbers-mode"')
.replace(/"(language-[^"]*?)"/, '"$1 line-numbers-mode"')

return finalCode
}
Expand Down

0 comments on commit 135b797

Please sign in to comment.