Skip to content

Commit 71e4b5b

Browse files
committed
Add a WHITESPACE after 3rd SQL pattern.
1 parent 0bcac2d commit 71e4b5b

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
77
## TODO Notes
88
- [x] Publish extension
99
- [ ] Add switches for Highlight Signs
10+
- [ ] Add Chinese usage
11+
12+
## [Realease]
13+
- Add a WHITESPACE in third SQL start matching rule.
1014

1115
## [Unreleased]
1216
- Ready to release

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ Syntax highlighting support for some specific language code in string.
1313
![single SQL stirng with Sign](./docs/single_SQL_with_Sign.png)
1414
2. Insert sign pair `--beginsql` or `--begin-sql` and `--endsql` or `--end-sql` to highlight one and more SQL suquences.<br>
1515
![multi SQL stirng with Sign](./docs/multi_SQL_with_Sign.png)
16-
3. Any SQL sequence starts with **UPPERCASE** keyword (such as `SELECT`, `INSERT`, `UPDATE` and etc), and ends with `;` will be highlighted automatically.<br>
16+
1. Any SQL sequence starts with **UPPERCASE** keyword (such as `SELECT`, `INSERT`, `UPDATE` and etc) and one of **WHITESPACE** character(such as `' ','\n','\t','\r','\f'`), and ends with `;` will be highlighted automatically.<br>
1717
![SQL stirng no Sign](./docs/SQL_without_Sign.png)
1818
- HTML
19-
- Insert sign pair `<!--html-->` and `<!--!html-->` to highlight one and more HTML suquences. Other comments can be added after `html` and `-->`.<br>
19+
- Insert sign pair `<!--html-->` and `<!--!html-->` to highlight one and more HTML suquences. Other comments can be added between `html` and `-->`.<br>
2020
![HTML with Sign](./docs/HTML_with_Sign.png)
2121
- Other
2222
- Highlight Variables in *highlighted* string code.<br>

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "highlight-string-code",
33
"displayName": "Highlight String Code",
44
"description": "Highlight string as a specific language",
5-
"version": "0.3.3",
5+
"version": "0.3.4",
66
"publisher": "iuyoy",
77
"author": {
88
"name": "iuyoy"
@@ -22,6 +22,10 @@
2222
"Programming Languages",
2323
"Snippets"
2424
],
25+
"tags":[
26+
"SQL",
27+
"HTML"
28+
],
2529
"contributes": {
2630
"languages": [
2731
{

syntaxes/highlight-sql-string.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"contentName": "meta.embedded"
106106
},
107107
{
108-
"begin": "(SELECT|INSERT|DELETE|UPDATE|DROP|ALTER|CREATE|SET|TRUNCATE|GRANT|REVOKE)",
108+
"begin": "(SELECT|INSERT|DELETE|UPDATE|DROP|ALTER|CREATE|SET|TRUNCATE|GRANT|REVOKE)\\s",
109109
"end": "(;)",
110110
"beginCaptures": {
111111
"1": {

0 commit comments

Comments
 (0)