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

Handle JS block comments the same as SQL block comments #10

Merged
merged 4 commits into from
Apr 21, 2024

Conversation

nicklausroach
Copy link
Member

YAML frontmatter should be handled the same way in Javascript as it is handled in SQL since the block comments are the same. Previously ABSQL attempted to parse the entire file as yaml and hit errors on backticks.

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.28%. Comparing base (95baa43) to head (3742272).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #10      +/-   ##
==========================================
+ Coverage   98.25%   98.28%   +0.02%     
==========================================
  Files          26       26              
  Lines         803      815      +12     
==========================================
+ Hits          789      801      +12     
  Misses         14       14              

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

Copy link
Member

@chriscardillo chriscardillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nicklausroach - this looks good but can you please add a test and/or modify an existing sample file to capture the use case you have fixed?

@nicklausroach
Copy link
Member Author

@chriscardillo good call. Added a a test that renders a simple JS file to make sure I didn't break that, and another test that renders a JS file with backticks. Happy to add more if that's helpful!

@chriscardillo chriscardillo merged commit 62e48f5 into main Apr 21, 2024
7 checks passed
@chriscardillo chriscardillo deleted the js-block-comments branch April 21, 2024 15:22
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.

2 participants