diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e286678..bdec7682 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ### 🐞 Fixes - [#874](https://github.com/estruyf/vscode-front-matter/issues/874): Fix media snippet markup insertion to article content's +- [#875](https://github.com/estruyf/vscode-front-matter/issues/875): Clean up the exclamation marks from the file name when creating new content ## [10.5.0] - 2024-10-21 - [Release notes](https://beta.frontmatter.codes/updates/v10.5.0) diff --git a/src/helpers/Sanitize.ts b/src/helpers/Sanitize.ts index 6187e0ec..2454210f 100644 --- a/src/helpers/Sanitize.ts +++ b/src/helpers/Sanitize.ts @@ -1,6 +1,6 @@ -const illegalRe = /[/?<>\\:*|"]/g; +const illegalRe = /[/?<>\\:*|"!]/g; // eslint-disable-next-line no-control-regex -const controlRe = /[\x00-\x1F\x80-\x9F]/g; +const controlRe = /[\x00-\x1f\x80-\x9f]/g; const reservedRe = /^\.+$/; const windowsReservedRe = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i; const windowsTrailingRe = /[. ]+$/;