Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
sywhb committed Jun 6, 2023
1 parent 582beb3 commit 815238c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/path_validation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ const expectedManualIllegalChars: string[] = [
"/",
"\\",
"?",
"%",
"*",
":",
"|",
'"',
"<",
">",
"\u0000",
];

describe("replaceIllegalChars() removes all expected characters", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const unicodeSlug = (str: string, savedAt: string) => {
};

export const replaceIllegalChars = (str: string): string => {
return str.replaceAll(ILLEGAL_CHAR_REGEX, REPLACEMENT_CHAR);
return str.replace(ILLEGAL_CHAR_REGEX, REPLACEMENT_CHAR);
};

export function formatDate(date: string, format: string): string {
Expand Down

0 comments on commit 815238c

Please sign in to comment.