diff --git a/CHANGELOG.md b/CHANGELOG.md index c47d6338..01af666a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ - [#703](https://github.com/estruyf/vscode-front-matter/issues/703): Fix retrieval of Astro Collections for `pnpm` projects - [#704](https://github.com/estruyf/vscode-front-matter/issues/704): Fix `zod` schema script for optional fields - [#707](https://github.com/estruyf/vscode-front-matter/issues/707): Fix `clearEmpty` issue with `draft` and `boolean` fields which are by default set to `true` +- [#711](https://github.com/estruyf/vscode-front-matter/issues/711): Fix in character mapping in the slug field - [#712](https://github.com/estruyf/vscode-front-matter/issues/712): Keep the search context when deleting media files ## [9.3.1] - 2023-10-27 diff --git a/src/helpers/SlugHelper.ts b/src/helpers/SlugHelper.ts index af106a54..de3b7177 100644 --- a/src/helpers/SlugHelper.ts +++ b/src/helpers/SlugHelper.ts @@ -64,6 +64,6 @@ export class SlugHelper { */ private static replaceCharacters(value: string) { const characters = [...value]; - return characters.map((c) => charMap[c] || c).join(''); + return characters.map((c) => (typeof charMap[c] === 'string' ? charMap[c] : c)).join(''); } }