Repository navigation
lang-core: accept triple-quoted strings - #1399
Closed
AbhinRustagi wants to merge 1 commit into
Closed
AbhinRustagi wants to merge 1 commit into
AbhinRustagi wants to merge 1 commit into
Conversation
LLMs reach for Python-style """…""" for multi-line code. Rewrite them as JSON string literals before lexing, in both parse and merge. Comments are copied through untouched so an apostrophe in one can't open a fake string and swallow the block that follows. Split out of #1385.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
AbhinRustagi
added a commit
that referenced
this pull request
Oct 13, 2026
Moved to #1399 so this PR stays on the component library.
2 of 4 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #1385 so that PR can stay focused on the component library.
"""…""". Our lexer reads that as an empty string plus an open quote, so the snippet comes out garbled.normalizeTripleQuotesrewrites those into normal JSON strings before lexing, in bothparseand statement merging, and handles a half-streamed body.// here's the code) opened a fake string and silently emptied the next"""block. Comments are now passed through untouched.cipasses locally.