Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

broken syntax highlighting with strange combination of SQL code inside of mult-line string #143

Open
jdavidheiser opened this issue Apr 21, 2016 · 8 comments
Labels

Comments

@jdavidheiser
Copy link

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

screen shot

@lee-dohm lee-dohm added the bug label Apr 21, 2016
@ulidtko
Copy link

ulidtko commented May 12, 2016

Two levels of quoting seem to trigger bad markup as well.

E.g. with single level of quoting:
screenshot from 2016-05-12 15-30-04

and with nested quoting:
screenshot from 2016-05-12 15-30-27

What's especially vexing with this bug — the rest of the file gets mishighlighted as well, and no simple way around that.

@thomir
Copy link

thomir commented Jul 17, 2016

Is there a workaround for this? Personally I'm fine without the syntax highlighting for SQL statements.

@PostalBlab
Copy link

@thomir you can disable language-sql. This works for me.

@erichurkman
Copy link

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

@matt-baker
Copy link

@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.

@agrrh
Copy link

agrrh commented Jan 6, 2018

+1, really annoying bug, especially with 'DELETE' part.

@ulidtko
Copy link

ulidtko commented Jan 10, 2018

Looks like language-python is heading to the trash can; MagicPython to replace it, see atom/atom/#13877.

@sunnyakaxd

This comment has been minimized.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

9 participants