Skip to content

Commit be711aa

Browse files
authored
Merge pull request #3 from tyhopp/master
Fix line highlighting issues
2 parents f21b93c + bba0efe commit be711aa

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, "-").toLowerCase();
133133
query.highlights.forEach(line => {
134134
$(`#file-${file}-LC${line}`).addClass("highlighted");
135135
});

0 commit comments

Comments
 (0)