marko-js / htmljs-parser

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

fix: issue with expression continuations containing equals #99

Closed DylanPiercey closed 2 years ago

DylanPiercey commented 2 years ago

Description

Fixes a bug where expression continuations containing equals (eg !=) were not consuming enough text because of unnecessary look ahead/behind.

Also optimize and limits valid equals sign expression regexes.

Checklist:

changeset-bot[bot] commented 2 years ago

🦋 Changeset detected

Latest commit: 7e7022ab2d5278351857b8d48c2ae2690df78185

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 #99 (7e7022a) into main (41b9e2b) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #99   +/-   ##
=======================================
  Coverage   94.51%   94.51%           
=======================================
  Files          26       26           
  Lines        1058     1058           
  Branches      251      251           
=======================================
  Hits         1000     1000           
  Misses         38       38           
  Partials       20       20           
Impacted Files Coverage Δ
src/states/EXPRESSION.ts 90.32% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 41b9e2b...7e7022a. Read the comment docs.