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: tag variable not terminated on concise mode text delimiter #150

Closed DylanPiercey closed 1 year ago

DylanPiercey commented 1 year ago

Description

The following would cause the parser to see the - after the tag var as an expression continuation instead of beginning a concise text block.

style/style --
  header {
    color: green
  }
changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 138b1c48ff505fc808084909ee94f76379ee8094

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

Base: 92.70% // Head: 93.41% // Increases project coverage by +0.70% :tada:

Coverage data is based on head (138b1c4) compared to base (cfa3483). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #150 +/- ## ========================================== + Coverage 92.70% 93.41% +0.70% ========================================== Files 26 26 Lines 1262 1276 +14 Branches 268 289 +21 ========================================== + Hits 1170 1192 +22 + Misses 58 53 -5 + Partials 34 31 -3 ``` | [Impacted Files](https://codecov.io/gh/marko-js/htmljs-parser/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js) | Coverage Δ | | |---|---|---| | [src/states/OPEN\_TAG.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3N0YXRlcy9PUEVOX1RBRy50cw==) | `90.95% <100.00%> (+3.08%)` | :arrow_up: | | [src/states/JS\_COMMENT\_LINE.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3N0YXRlcy9KU19DT01NRU5UX0xJTkUudHM=) | `77.77% <0.00%> (-9.73%)` | :arrow_down: | | [src/states/CONCISE\_HTML\_CONTENT.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3N0YXRlcy9DT05DSVNFX0hUTUxfQ09OVEVOVC50cw==) | `89.23% <0.00%> (-2.84%)` | :arrow_down: | | [src/states/HTML\_CONTENT.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3N0YXRlcy9IVE1MX0NPTlRFTlQudHM=) | `91.89% <0.00%> (-2.48%)` | :arrow_down: | | [src/states/TAG\_NAME.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3N0YXRlcy9UQUdfTkFNRS50cw==) | `98.24% <0.00%> (+0.03%)` | :arrow_up: | | [src/core/Parser.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL2NvcmUvUGFyc2VyLnRz) | `93.47% <0.00%> (+0.77%)` | :arrow_up: | | [src/states/ATTRIBUTE.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3N0YXRlcy9BVFRSSUJVVEUudHM=) | `95.20% <0.00%> (+1.45%)` | :arrow_up: | | [src/states/PLACEHOLDER.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3N0YXRlcy9QTEFDRUhPTERFUi50cw==) | `97.61% <0.00%> (+2.38%)` | :arrow_up: | | [src/states/CLOSE\_TAG.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3N0YXRlcy9DTE9TRV9UQUcudHM=) | `93.33% <0.00%> (+4.44%)` | :arrow_up: | | ... and [1 more](https://codecov.io/gh/marko-js/htmljs-parser/pull/150?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 at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.