diff --git a/.changeset/escape-text.md b/.changeset/escape-text.md deleted file mode 100644 index a7e017ba..00000000 --- a/.changeset/escape-text.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"htmljs-parser": minor ---- - -Export `escapeText`, which escapes text content so the parser reads it back as the same text, for tools that print Marko source. Only a backslash run before `${` or `$!{` is changed; pass the content printed after the text as the second argument so that a backslash run ending the text does not escape a placeholder it leads into. diff --git a/.changeset/odd-backslash-runs.md b/.changeset/odd-backslash-runs.md deleted file mode 100644 index eed91ad7..00000000 --- a/.changeset/odd-backslash-runs.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"htmljs-parser": patch ---- - -Read an odd run of five or more backslashes before `${` or `$!{` as escapes, like a run of one or three: `\\\\\${x}` is now the text `\\${x}` rather than two backslashes and a placeholder. diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fa400cf..3ed13e4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # htmljs-parser +## 5.16.0 + +### Minor Changes + +- [#246](https://github.com/marko-js/htmljs-parser/pull/246) [`402c94f`](https://github.com/marko-js/htmljs-parser/commit/402c94f224eb0e99dab492026d03d8cfd7e84a38) Thanks [@DylanPiercey](https://github.com/DylanPiercey)! - Export `escapeText`, which escapes text content so the parser reads it back as the same text, for tools that print Marko source. Only a backslash run before `${` or `$!{` is changed; pass the content printed after the text as the second argument so that a backslash run ending the text does not escape a placeholder it leads into. + +### Patch Changes + +- [#246](https://github.com/marko-js/htmljs-parser/pull/246) [`402c94f`](https://github.com/marko-js/htmljs-parser/commit/402c94f224eb0e99dab492026d03d8cfd7e84a38) Thanks [@DylanPiercey](https://github.com/DylanPiercey)! - Read an odd run of five or more backslashes before `${` or `$!{` as escapes, like a run of one or three: `\\\\\${x}` is now the text `\\${x}` rather than two backslashes and a placeholder. + ## 5.15.1 ### Patch Changes diff --git a/package.json b/package.json index ad35327b..6689170c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "htmljs-parser", - "version": "5.15.1", + "version": "5.16.0", "description": "An HTML parser recognizes content and string placeholders and allows JavaScript expressions as attribute values", "keywords": [ "HTML",