Skip to content

Conversation

@rschrieken
Copy link
Contributor

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

@NickCraver
Copy link
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.

@tms
Copy link
Contributor

tms commented Sep 22, 2020

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?

@rschrieken
Copy link
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.

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.

3 participants