Skip to content

Commit

Permalink
fix: escape separator in regex
Browse files Browse the repository at this point in the history
  • Loading branch information
mlrawlings committed Apr 10, 2020
1 parent f854a32 commit 8535f15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export function defaultNormalizer(container: ContainerNode) {
return clone;
}

const sep = path.sep;
const sep = `\\${path.sep}`;
const nameRegex = new RegExp(`${sep}(([^${sep}]+)${sep}([^${sep}]+)\\.marko$)`);
function inferName(p: string) {
const match = nameRegex.exec(p)!;
Expand Down

0 comments on commit 8535f15

Please sign in to comment.