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

Refactor custom node implementation, add visitor API and stable unqoted text. #44

Merged
merged 14 commits into from
Jan 14, 2024

Conversation

vldm
Copy link
Collaborator

@vldm vldm commented Jan 8, 2024

Closes: #13
Closes: #5

  • This pr contain a lot of fixes, few of them refactor CustomNode to use ParseRecoverable and ToTokens instead of custom methods.

  • New crate rstml-controll-flow was added in order to show how to use CustomNode in real project.

  • Added visitor API and refactored html-to-string-macro to use it.

  • Added hack for stable to parse unquoted text correctly, this is hidden behind feature gate "rawtext-stable-hack"
    Because hack is using source_text function, it cannot be used if template macro called from generated input.
    Macro matcher module allows extracting html template from macro arguments.

@vldm vldm force-pushed the test-custom-nodes branch from 2f657bf to 8c683c1 Compare January 8, 2024 18:07
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2024

Codecov Report

Attention: 271 lines in your changes are missing coverage. Please review.

Comparison is base (8f8f199) 76.93% compared to head (8378681) 71.26%.

Files Patch % Lines
src/visitor.rs 68.38% 49 Missing ⚠️
rstml-control-flow/src/escape.rs 75.00% 35 Missing ⚠️
rstml-control-flow/src/lib.rs 17.07% 34 Missing ⚠️
src/rawtext_stable_hack.rs 69.52% 32 Missing ⚠️
rstml-control-flow/src/tags.rs 81.53% 24 Missing ⚠️
src/node/raw_text.rs 44.11% 19 Missing ⚠️
src/parser/recoverable.rs 54.76% 19 Missing ⚠️
src/parser/mod.rs 40.00% 18 Missing ⚠️
src/node/mod.rs 57.57% 14 Missing ⚠️
rstml-control-flow/src/extendable.rs 78.72% 10 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #44      +/-   ##
==========================================
- Coverage   76.93%   71.26%   -5.67%     
==========================================
  Files          12       18       +6     
  Lines         750     1507     +757     
==========================================
+ Hits          577     1074     +497     
- Misses        173      433     +260     

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

@vldm vldm force-pushed the test-custom-nodes branch 2 times, most recently from 252689c to 1034d21 Compare January 8, 2024 18:15
@vldm vldm force-pushed the test-custom-nodes branch from 1034d21 to 24c3d64 Compare January 8, 2024 18:43
@vldm vldm force-pushed the test-custom-nodes branch from 0dccd7d to 0471cfd Compare January 9, 2024 17:05
@vldm vldm force-pushed the test-custom-nodes branch from d81be52 to 8378681 Compare January 9, 2024 18:05
@vldm vldm merged commit 0961f3c into main Jan 14, 2024
3 of 5 checks passed
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.

Visitor API Unquoted text on stable
2 participants