language-python
language-python copied to clipboard
broken syntax highlighting with strange combination of SQL code inside of mult-line string
As seen in the below code snippit - the extra assignment lines are interpreted as being part of the triple quote.
Getting rid of the parens or the SELECT statement (so it's not not trying to format as if it were SQL) seems to stop this behavior.
text = """ ('SELECT columns FROM table') """
int = 1
float = 2.0
Two levels of quoting seem to trigger bad markup as well.
E.g. with single level of quoting:
and with nested quoting:
What's especially vexing with this bug — the rest of the file gets mishighlighted as well, and no simple way around that.
Is there a workaround for this? Personally I'm fine without the syntax highlighting for SQL statements.
@thomir you can disable language-sql. This works for me.
This also seems to slow down the entire editor. I have a rather large file full of multi-line strings with embedded quotes in SQL, and editing any line after the first instance of this formatting issue causes is 2-3 seconds per keystroke. Disabling language-sql
does work, thanks @PostalBlab
@PostalBlab - thanks for the workaround on disabling language-sql. That worked for me as well.
For anyone else looking for where to disable language-sql - it's under Preferences\Packages.
+1, really annoying bug, especially with 'DELETE'
part.
Looks like language-python
is heading to the trash can; MagicPython
to replace it, see atom/atom/#13877.
+1 +Ping