diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d6e42d5..efc761b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - [#469](https://github.com/estruyf/vscode-front-matter/issues/469): Fix for using the root folder as content folder - [#470](https://github.com/estruyf/vscode-front-matter/issues/470): Fix `initialize project` dashboard description - [#482](https://github.com/estruyf/vscode-front-matter/issues/482): Update the description when you want to overwrite the default content type description +- [#493](https://github.com/estruyf/vscode-front-matter/issues/493): Fix an issue where a custom placeholder value is replaced by an `array` instead of a `string` ## [8.2.0] - 2022-12-08 - [Release notes](https://beta.frontmatter.codes/updates/v8.2.0) diff --git a/src/helpers/ArticleHelper.ts b/src/helpers/ArticleHelper.ts index 260142b0..64c16559 100644 --- a/src/helpers/ArticleHelper.ts +++ b/src/helpers/ArticleHelper.ts @@ -460,7 +460,9 @@ export class ArticleHelper { // Do nothing } } else { - output = output.split("\n"); + if (output.includes("\n")) { + output = output.split("\n"); + } } placeHolderValue = output;