Skip to content

Commit eb4becf

Browse files
Fix Windows path separator handling in lint-markdown-code-blocks
1 parent f5fa1e8 commit eb4becf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎eslint-local-rules/rules/lint-markdown-code-blocks.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ module.exports = {
3535
create(context) {
3636
return {
3737
Program(node) {
38-
const filename = context.getFilename();
38+
const rawFilename = context.getFilename();
39+
const filename = rawFilename.replace(/\\/g, '/');
3940
if (!filename.endsWith('.md') || !filename.includes('src/content')) {
4041
return;
4142
}

0 commit comments

Comments
 (0)