Skip to content

Commit 82b4d33

Browse files
author
Ty
committed
Make regex parsing file names global
1 parent 04f4870 commit 82b4d33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export default async ({ markdownAST }, options = {}) => {
129129
let html = content.div;
130130
if (query.highlights.length > 0) {
131131
const $ = cheerio.load(content.div);
132-
const file = query.file.replace(/[^a-zA-Z0-9_]+/, "-");
132+
const file = query.file.replace(/[^a-zA-Z0-9_]+/g, "-");
133133
query.highlights.forEach(line => {
134134
$(`#file-${file.toLowerCase()}-LC${line}`).addClass("highlighted");
135135
});

0 commit comments

Comments
 (0)