Skip to content

Commit 1c47845

Browse files
committed
Fix issue#5
1 parent 27e13a5 commit 1c47845

File tree

7 files changed

+47
-6
lines changed

7 files changed

+47
-6
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,49 @@ All notable changes to the "highlight-string-code" extension will be documented
44

55
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
66

7+
Develop slowly for features.
8+
79
## TODO Notes
10+
811
- [x] Publish extension
912
- [ ] Add switches for Highlight Signs
1013
- [x] Add Chinese usage
1114

1215
## [Realease]
1316

17+
### [v0.4.5]
18+
19+
- Modify js highlight pattern to fix [Issue#5](https://github.com/iuyoy/highlight-string-code/issues/5).
20+
1421
### [v0.4.4]
22+
1523
- Add "\s*" pattern before some signs to fix [Issue#1](https://github.com/iuyoy/highlight-string-code/issues/1).
1624

1725
### [v0.4.3]
26+
1827
- Add yaml support
1928
- Fix typos.
2029

2130
### [v0.4.2]
31+
2232
- Add sign pair snippets for highlighting block.
2333
- Fix some typos.
2434

2535
### [v0.4.1]
36+
2637
- Add Chinese Readme file.
2738

2839
### [v0.4.0]
40+
2941
- Reconstitute language injections
3042
- Add embeddedLanguages and tokenTypes features to support commenting, bracket matching, auto closing pairs, snippet selection and so on.
3143

3244
### [v0.3.4]
45+
3346
- Add a WHITESPACE in third SQL start matching rule.
3447

3548
## [Unreleased]
49+
3650
- Ready to release
3751
- Keep variables highlighted between `{` and `}` in string code.
3852
- Add usages

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Highlight String Code
22

33
Highlight string as SQL, HTML, CSS or JavaScript in most languages.
4+
45
在代码中,高亮 SQL、HTML、CSS 或者 JavaScript 代码。
56

67
## Documents
@@ -27,7 +28,7 @@ Highlight string as SQL, HTML, CSS or JavaScript in most languages.
2728
| SQL | `--beginsql`, `--endsql` | `hsql`, `highlight-sql` |
2829
| SQL | `--begin-sql`, `--end-sql` | - |
2930
| SQL | UPPERCASE KEYWORD, `;` | - |
30-
| Hive SQL | `--hive`, `--!hive` | `hhsql`, `highlight-hive-sql` | [Hive SQL](https://marketplace.visualstudio.com/items?itemName=josephtbradley.hive-sql) is required
31+
| Hive SQL | `--hive`, `--!hive` | `hhsql`, `highlight-hive-sql` | [Hive SQL](https://marketplace.visualstudio.com/items?itemName=josephtbradley.hive-sql) is required
3132
| HTML | `<!--html-->`, `<!--!html-->` | `hhtml`, `highlight-html` |
3233
| CSS | `/*css*/`, `/*!css*/` | `hcss`, `highlight-css` |
3334
| JS | `//js`, `//!js` | `hjs`, `highlight-javascript` |
@@ -52,25 +53,32 @@ Highlight string as SQL, HTML, CSS or JavaScript in most languages.
5253
- Type `h{language_abbr}` or `highlight-{language_name}` to insert a highlight block sign pair. For example, type `hjs` or `highlight-javascript` to insert `// js` and `// !js`.
5354
![Snippets](./docs/hjs-snippets.png)
5455

55-
5656
## Installation
5757

5858
- Install from VS Code extensions (`ctrl + shift + x` or `cmd + shift + x` on mac).
5959
- Install from [VSIX](https://github.com/iuyoy/highlight-string-code/releases) manually.
6060

6161
## Release Notes
6262

63+
### [v0.4.5]
64+
65+
- Modify js highlight pattern to fix [Issue#5](https://github.com/iuyoy/highlight-string-code/issues/5).
66+
6367
### [v0.4.4]
68+
6469
- Add "\s*" pattern before some signs to fix [Issue#1](https://github.com/iuyoy/highlight-string-code/issues/1).
6570

6671
### [v0.4.3]
72+
6773
- Add yaml support
6874
- Fix typos.
6975

7076
Please see [CHANGELOG.md](./CHANGELOG.md) for more information.
7177

7278
## Issues
79+
7380
If you have any suggestion or issue, please feel free to submit it at [Github Issues](https://github.com/iuyoy/highlight-string-code/issues) page.
81+
Any pull requests to add more features or improve the experience are also welcome.
7482

7583
## References
7684

docs/README_CN.md

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

6060
## 更新日志
6161

62+
### [v0.4.5]
63+
64+
- 修改了高亮 js 的正则来修复 [Issue#5](https://github.com/iuyoy/highlight-string-code/issues/5).
65+
6266
### [v0.4.4]
63-
- 在语言标记前增加空白符匹配来修正[Issue#1](https://github.com/iuyoy/highlight-string-code/issues/1)
6467

68+
- 在语言标记前增加空白符匹配来修正[Issue#1](https://github.com/iuyoy/highlight-string-code/issues/1)
6569

6670
### [v0.4.3]
71+
6772
- 支持高亮 Yaml
6873

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

docs/demo.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,15 @@
6868
return 123;
6969
};
7070
//!js
71-
var a = 1;
71+
72+
http: // js
73+
var a = 2;
74+
// !js
75+
76+
var a=1;
77+
://js
7278
alert(a);
79+
//!js
7380
console.log(a);
7481
function b() {
7582
return 123;

docs/demo.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,15 @@ function b() {
7070
return 123;
7171
};
7272
//!js
73+
74+
http: // js
75+
var a = 2;
76+
// !js
77+
7378
var a=1;
79+
://js
7480
alert(a);
81+
//!js
7582
console.log(a);
7683
function b() {
7784
return 123;

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.4",
5+
"version": "0.4.5",
66
"publisher": "iuyoy",
77
"author": {
88
"name": "iuyoy"

syntaxes/highlight-string-code.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
]
8787
},
8888
"highlight-string-js": {
89-
"begin": "(\\s*// *(js)[^/]*)",
89+
"begin": "(\\s*([^:]|^)// *(js)[^/]*)",
9090
"end": "(\\s*// *(\\!js)[^/]*)",
9191
"captures": {
9292
"1": {

0 commit comments

Comments
 (0)