fixes the TSQL string escape parsing inside codemirror sql.js#104
Open
rschrieken wants to merge 1 commit intoStackExchange:masterfrom
Open
fixes the TSQL string escape parsing inside codemirror sql.js#104rschrieken wants to merge 1 commit intoStackExchange:masterfrom
rschrieken wants to merge 1 commit intoStackExchange:masterfrom
Conversation
Contributor
|
Is this fixed in a newer CodeMirror release by chance? This is the the thing of thing we should upstream lest is be nuked by an update. |
Contributor
|
This is a custom highlighter that does some SEDE-specific stuff on top of TSQL, but there might be a better way of doing it now that would allow taking upstream improvements too? |
Contributor
Author
|
I checked the current version of that function which I believe is found here: https://github.com/codemirror/CodeMirror/blob/3bf49684d4c62965c1257421c2fe8593f7660d59/mode/sql/sql.js#L133 and that won't fix that bug. Inspecting the codemirror.next doesn't tell me if this gets fixed but I would need to grab these bits and then test to verify. |
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.
a ' doesn't escape a ' in a T-SQL string, a double quote does. So the codemirror highlighting needs to honor that.
This fixes https://meta.stackexchange.com/questions/350640/backslash-before-single-quote-breaks-syntax-highlighting-the-quote-is-not-escap