marko-js / htmljs-parser

An HTML parser recognizes content and string placeholders and allows JavaScript expressions as attribute values
MIT License
135 stars 20 forks source link

fix: parsed text string literals #158

Closed DylanPiercey closed 1 year ago

DylanPiercey commented 1 year ago

Description

Fixes an regression where string literals inside of parsed text nodes (eg <script>) were not properly changing the parser state. This caused issues when comment like syntax was embedded within these string literals"

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 87b828f6bdf01a6e384456dd888fb1fe4ceb1102

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------- | ----- | | htmljs-parser | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 92.30% and project coverage change: +0.22 :tada:

Comparison is base (0ef31cd) 93.43% compared to head (87b828f) 93.65%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #158 +/- ## ========================================== + Coverage 93.43% 93.65% +0.22% ========================================== Files 26 27 +1 Lines 1280 1293 +13 Branches 291 293 +2 ========================================== + Hits 1196 1211 +15 + Misses 54 53 -1 + Partials 30 29 -1 ``` | [Impacted Files](https://codecov.io/gh/marko-js/htmljs-parser/pull/158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js) | Coverage Δ | | |---|---|---| | [src/states/PARSED\_STRING.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3N0YXRlcy9QQVJTRURfU1RSSU5HLnRz) | `88.88% <88.88%> (ø)` | | | [src/states/PARSED\_TEXT\_CONTENT.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3N0YXRlcy9QQVJTRURfVEVYVF9DT05URU5ULnRz) | `100.00% <100.00%> (ø)` | | | [src/states/index.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3N0YXRlcy9pbmRleC50cw==) | `100.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://codecov.io/gh/marko-js/htmljs-parser/pull/158/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js) Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.