Skip to content

Commit 27e13a5

Browse files
committed
Fix issue#1
1 parent 87d32ff commit 27e13a5

File tree

5 files changed

+29
-18
lines changed

5 files changed

+29
-18
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
1111

1212
## [Realease]
1313

14-
### [v0.4.2]
14+
### [v0.4.4]
15+
- Add "\s*" pattern before some signs to fix [Issue#1](https://github.com/iuyoy/highlight-string-code/issues/1).
16+
17+
### [v0.4.3]
1518
- Add yaml support
1619
- Fix typos.
1720

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ Highlight string as SQL, HTML, CSS or JavaScript in most languages.
6060

6161
## Release Notes
6262

63-
### [v0.4.2]
64-
- support Yaml
63+
### [v0.4.4]
64+
- Add "\s*" pattern before some signs to fix [Issue#1](https://github.com/iuyoy/highlight-string-code/issues/1).
65+
66+
### [v0.4.3]
67+
- Add yaml support
68+
- Fix typos.
6569

6670
Please see [CHANGELOG.md](./CHANGELOG.md) for more information.
6771

docs/README_CN.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ Highlight string as SQL, HTML, CSS or JavaScript in most languages.
5959

6060
## 更新日志
6161

62-
### [v0.4.2]
62+
### [v0.4.4]
63+
- 在语言标记前增加空白符匹配来修正[Issue#1](https://github.com/iuyoy/highlight-string-code/issues/1)
64+
65+
66+
### [v0.4.3]
6367
- 支持高亮 Yaml
6468

6569
更多信息请见 [CHANGELOG.md](./CHANGELOG.md)

package.json

Lines changed: 1 addition & 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 SQL, HTML, CSS or JS in most languages. 高亮内嵌的SQL,HTML, CSS或者JS",
5-
"version": "0.4.3",
5+
"version": "0.4.4",
66
"publisher": "iuyoy",
77
"author": {
88
"name": "iuyoy"

syntaxes/highlight-string-code.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
]
6969
},
7070
"highlight-string-css": {
71-
"begin": "(/\\* *(css).*\\*/)",
72-
"end": "(/\\* *(\\!css).*\\*/)",
71+
"begin": "(\\s*/\\* *(css).*\\*/)",
72+
"end": "(\\s*/\\* *(\\!css).*\\*/)",
7373
"captures": {
7474
"1": {
7575
"name": "comment.inline.css"
@@ -86,8 +86,8 @@
8686
]
8787
},
8888
"highlight-string-js": {
89-
"begin": "(// *(js)[^/]*)",
90-
"end": "(// *(\\!js)[^/]*)",
89+
"begin": "(\\s*// *(js)[^/]*)",
90+
"end": "(\\s*// *(\\!js)[^/]*)",
9191
"captures": {
9292
"1": {
9393
"name": "comment.line.double-slash.js"
@@ -104,8 +104,8 @@
104104
]
105105
},
106106
"highlight-string-html": {
107-
"begin": "(<!-- *(html).*-->)",
108-
"end": "(<!-- *(\\!html).*-->)",
107+
"begin": "(\\s*<!-- *(html).*-->)",
108+
"end": "(\\s*<!-- *(\\!html).*-->)",
109109
"captures": {
110110
"1": {
111111
"name": "comment.block.html"
@@ -124,7 +124,7 @@
124124
"highlight-string-sql": {
125125
"patterns": [
126126
{
127-
"begin": "(-- *(sql).*)",
127+
"begin": "(\\s*-- *(sql).*)",
128128
"beginCaptures": {
129129
"1": {
130130
"name": "comment.line.double-dash.sql"
@@ -147,8 +147,8 @@
147147
]
148148
},
149149
{
150-
"begin": "(-- *(beginsql|begin-sql).*)",
151-
"end": "(-- *(endsql|end-sql).*)",
150+
"begin": "(\\s*-- *(beginsql|begin-sql).*)",
151+
"end": "(\\s*-- *(endsql|end-sql).*)",
152152
"captures": {
153153
"1": {
154154
"name": "comment.line.double-dash.sql"
@@ -190,8 +190,8 @@
190190
]
191191
},
192192
"highlight-string-hive": {
193-
"begin": "(-- *(hive).*)",
194-
"end": "(-- *(!hive).*)",
193+
"begin": "(\\s*-- *(hive).*)",
194+
"end": "(\\s*-- *(!hive).*)",
195195
"captures": {
196196
"1": {
197197
"name": "comment.line.double-slash.asciidoc"
@@ -211,8 +211,8 @@
211211
]
212212
},
213213
"highlight-string-yaml": {
214-
"begin": "( *--- *#yaml)",
215-
"end": "( *# *!yaml)",
214+
"begin": "(\\s*--- *#yaml)",
215+
"end": "(\\s*# *!yaml)",
216216
"captures": {
217217
"1": {
218218
"name": "comment.line.double-slash.asciidoc"

0 commit comments

Comments
 (0)