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

Conversation

winstliu
Copy link
Contributor

@winstliu winstliu commented Mar 23, 2018

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

atom/language-sql#70 now uses some begin/end patterns, which messes with language-python's ability to tokenize escaped characters and formatting specifiers in them. To work around that, we now inject those patterns with the highest priority when an embedded SQL string is detected.

Alternate Designs

Don't use begin/end patterns to match parentheses in language-sql.

Benefits

Backslashes in embedded SQL strings should be tokenized correctly again.

Possible Drawbacks

None?

Applicable Issues

Fixes #240

Note: needs specs, though adding specs to cover this may take effort because the existing specs are useless.

@winstliu
Copy link
Contributor Author

python-sql-escaped-quote

@Arcanemagus
Copy link

Is this going to be an issue in other languages that embed SQL like PHP?

@winstliu
Copy link
Contributor Author

...probably, yeah.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Escaped quotes in SQL strings break highlighting

2 participants