This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
sql language injection not properly terminated in tagged template literals #601
Open
Description
Prerequisites
- [x ] Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
Does not properly end SQL language injection in tagged template literals. The npm package sql-template-strings supports a .append function that can be used to chain together a complex sql query. If a parenthesis is opened in one tagged template literal where the injected grammar is sql, the language injection doesn't stop when the template string is terminated.
Steps to Reproduce
- Open a .js file
- create a a tagged template literal with SQL``
- Do something like
const sql = SQL`SELECT * FROM ( SELECT *`
... write more javascript
The javascript will not be parsed correctly until the parens is closed.
Expected behavior: terminated language injection when template literal is closed
Actual behavior: javascript below will be parsed incorrectly
Reproduces how often: 100%
Versions
Atom : 1.31.1
Electron: 2.0.7
Chrome : 61.0.3163.100
Node : 8.9.3
OS: Ubuntu 16.04
Metadata
Metadata
Assignees
Labels
No labels