Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: issue diffing unescaped html that contains comments #2294

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

DylanPiercey
Copy link
Contributor

Description

Fixes a regression where unescaped html that contained a comment node was throwing an exception while diffing.
This was caused by #1519 which assumed the comment nodes were no longer used (bad assumption).

Besides support for diffing unescaped html with comments, now any nodes which cannot be virtualized are skipped.

This PR also fixes the <html-comment> tag syntax to properly output vdom nodes.

Checklist:

  • I have read the CONTRIBUTING document and have signed (or will sign) the CLA.
  • I have updated/added documentation affected by my changes.
  • I have added tests to cover my changes.

Copy link

changeset-bot bot commented Sep 19, 2024

🦋 Changeset detected

Latest commit: e7841c3

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

This PR includes changesets to release 3 packages
Name Type
@marko/translator-default Patch
marko Patch
@marko/compiler 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

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 90.27778% with 7 lines in your changes missing coverage. Please review.

Project coverage is 88.67%. Comparing base (acc18f6) to head (e7841c3).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/marko/src/runtime/vdom/VComment.js 75.00% 6 Missing ⚠️
...ackages/marko/src/runtime/vdom/AsyncVDOMBuilder.js 80.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2294   +/-   ##
=======================================
  Coverage   88.66%   88.67%           
=======================================
  Files         339      340    +1     
  Lines       35272    35340   +68     
  Branches     2106     2060   -46     
=======================================
+ Hits        31275    31336   +61     
- Misses       3997     4004    +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DylanPiercey DylanPiercey merged commit c600610 into main Sep 19, 2024
9 checks passed
@DylanPiercey DylanPiercey deleted the bring-back-vcomment branch September 19, 2024 21:33
@github-actions github-actions bot mentioned this pull request Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant