fix: unpaired apostrophe in JavaScript comments#370
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates the Eta template parser to recognize and skip JavaScript-style single-line (// ...) comments while scanning template code blocks, preventing premature tag-closing detection inside line comments.
Changes:
- Extend the close-token regex to detect
//comment starts. - Add logic to advance the parser index to the next line terminator when
//is encountered.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…rs in JavaScript comments
|
@rtritto I think we'll want test coverage in Also: I am worried about edge cases such as open-close syntax elements (such as the apostrophe, double-quote, and so on) that themselves contain comments -- e.g. a string such as I'll try to find some time to explore other examples that might cause the parser to misinterpret the input; trying to find those should allow us to make the parser more robust. |
|
@jayaddison add some test on |
Fix #337