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: ensure keyword operators are always followed by a space #146

Closed DylanPiercey closed 1 year ago

DylanPiercey commented 1 year ago

Fixes an issue where attribute names that started with a keyword (eg: as-thing or instanceof-thing) were incorrectly treated as an expression continuation.

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 85b10c42d2f252fe3bc6b84a44bc8d008f49c716

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.13% // Head: 93.23% // Increases project coverage by +1.09% :tada:

Coverage data is based on head (85b10c4) compared to base (b232aa2). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #146 +/- ## ========================================== + Coverage 92.13% 93.23% +1.09% ========================================== Files 26 26 Lines 1259 1271 +12 Branches 267 287 +20 ========================================== + Hits 1160 1185 +25 + Misses 62 55 -7 + Partials 37 31 -6 ``` | [Impacted Files](https://codecov.io/gh/marko-js/htmljs-parser/pull/146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js) | Coverage Δ | | |---|---|---| | [src/states/EXPRESSION.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3N0YXRlcy9FWFBSRVNTSU9OLnRz) | `93.37% <ø> (-0.05%)` | :arrow_down: | | [src/states/JS\_COMMENT\_LINE.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/146?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/146?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/146?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/146?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/states/ATTRIBUTE.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/146?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%> (+2.14%)` | :arrow_up: | | [src/states/PLACEHOLDER.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/146?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/OPEN\_TAG.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3N0YXRlcy9PUEVOX1RBRy50cw==) | `90.43% <0.00%> (+2.56%)` | :arrow_up: | | [src/core/Parser.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL2NvcmUvUGFyc2VyLnRz) | `92.75% <0.00%> (+4.43%)` | :arrow_up: | | [src/states/CLOSE\_TAG.ts](https://codecov.io/gh/marko-js/htmljs-parser/pull/146?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/146?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.