Skip to content

Commit

Permalink
fix(build): handle - in title of code blocks with line highlighting (
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Dec 29, 2022
1 parent e72998b commit ce9467e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/markdown/plugins/highlight.ts
Expand Up @@ -20,7 +20,7 @@ import type { ThemeOptions } from '../markdown'
* [{ line: number, classes: string[] }]
*/
const attrsToLines = (attrs: string): HtmlRendererOptions['lineOptions'] => {
attrs = attrs.replace(/.*?([\d,-]+).*/, '$1').trim()
attrs = attrs.replace(/^(?:\[.*?\])?.*?([\d,-]+).*/, '$1').trim()
const result: number[] = []
if (!attrs) {
return []
Expand Down

0 comments on commit ce9467e

Please sign in to comment.