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: regression with comments inside parsed text state #132

Closed DylanPiercey closed 2 years ago

DylanPiercey commented 2 years ago

Description

Fixes an issue where parsed text state tags (eg <script>) were not properly being ended if the line ended with a comment. This was a regression.

<script>// This should close even though there is a line comment on the same line</script>

Checklist:

changeset-bot[bot] commented 2 years ago

🦋 Changeset detected

Latest commit: 005019852672b54daaebf093ddc8e26211758f9a

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 2 years ago

Codecov Report

Merging #132 (0050198) into main (ab0abcf) will decrease coverage by 0.00%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #132      +/-   ##
==========================================
- Coverage   92.02%   92.01%   -0.01%     
==========================================
  Files          26       26              
  Lines         803      802       -1     
  Branches      268      267       -1     
==========================================
- Hits          739      738       -1     
  Misses         49       49              
  Partials       15       15              
Impacted Files Coverage Δ
src/states/JS_COMMENT_LINE.ts 71.42% <ø> (ø)
src/states/PARSED_TEXT_CONTENT.ts 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.