Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for /*sql*/ as begin #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Syntax highlighting for code like:

```js
const query = sql`SELECT * FROM users`;

//Or with comments so that javascript doesn't crash
const query2 = /*sql*/`SELECT * FROM users`;
```

## Publishing
Expand All @@ -15,4 +18,4 @@ regenerating.
```
npm install -g vsce
vsce publish
```
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-sql-template-literal",
"displayName": "vscode-sql-template-literal",
"description": "Syntax highlighting for sql in template literals",
"version": "0.1.0",
"version": "0.1.1",
"publisher": "forbeslindesay",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion syntaxes/lit-sql.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "taggedTemplates",
"contentName": "meta.embedded.block.sql",
"begin": "sql((`))",
"begin": "(sql|\\/\\*sql\\*\\/)?`",
"beginCaptures": {
"1": {
"name": "entity.name.function.tagged-template.js"
Expand Down
1 change: 1 addition & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
const query = sql`SELECT * FROM users`;
const query2 = /*sql*/`SELECT * FROM users`;