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: comment stripping should remove multiline comments (#279) #280

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cjpearson
Copy link

Resolves #279

@pi0
Copy link
Member

pi0 commented Oct 6, 2024

Thanks for the PR dear @cjpearson

Removing multi-line comments without AST awareness can be unsafe this is why we don't it.

See #56 for some context.

Until #219 arrives, if we can find similar solution to #56 i am open to it otherwise i would wait.

Copy link

codecov bot commented Oct 6, 2024

Codecov Report

Attention: Patch coverage is 45.45455% with 6 lines in your changes missing coverage. Please review.

Project coverage is 90.62%. Comparing base (226a47b) to head (918e835).
Report is 61 commits behind head on main.

Files with missing lines Patch % Lines
src/syntax.ts 45.45% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #280      +/-   ##
==========================================
+ Coverage   88.04%   90.62%   +2.58%     
==========================================
  Files           8        8              
  Lines        1062     1547     +485     
  Branches      188      197       +9     
==========================================
+ Hits          935     1402     +467     
- Misses        127      145      +18     

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

@cjpearson
Copy link
Author

Oh I didn't realize acorn was already in this package. I think that would be a much better way to handle comments. I'll take a look at that approach.

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.

Multiline comments are not stripped
2 participants