Skip to content

Commit d0818a4

Browse files
committed
fix #52
1 parent f4a40af commit d0818a4

File tree

12 files changed

+139
-30
lines changed

12 files changed

+139
-30
lines changed

CHANGELOG.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# Changelog
22

3-
| Version | Date | Changelog |
4-
| ------- | -------- | ------ |
5-
| 0.0.1 | 04.10.2018 | Release Preview |
6-
| 0.1.0 | 12.22.2018 | Added ability to have spaces in a commented html function, so /* html */ is now possible. |
7-
| 0.2.0 | 01.08.2019 | Added CSS language support. |
8-
| 0.2.5 | 01.28.2019 | Fixed wrong CSS completions issue. |
9-
| 0.3.0 | 01.30.2019 | Preliminary formatting support. |
10-
| 0.3.1 | 05.08.2021 | Back to working state. |
11-
| 0.3.2 | 01.21.2022 | Allow non-whitespace before html tag thanks to @P-Froggy. |
12-
| 0.3.5 | 01.29.2022 | Revert @P-Froggy change while still allowing non-whitespace before tags. |
13-
| 0.3.6 | 09.15.2022 | Fix for typescriptreact files, as well as new snippets for easier block creation. |
14-
| 0.3.7 | 03.04.2023 | Added support for style tags highlighting/completion/hover. |
15-
| 0.3.8 | 04.10.2023 | Fixed regression in 0.3.7 that resulted in issue #39. |
16-
| 0.3.9 | 11.10.2023 | Added support for case insensitive blocks to fix #44. |
3+
| Version | Date | Changelog |
4+
| ------- | ---------- | ----------------------------------------------------------------------------------------- |
5+
| 0.0.1 | 04.10.2018 | Release Preview |
6+
| 0.1.0 | 12.22.2018 | Added ability to have spaces in a commented html function, so /* html */ is now possible. |
7+
| 0.2.0 | 01.08.2019 | Added CSS language support. |
8+
| 0.2.5 | 01.28.2019 | Fixed wrong CSS completions issue. |
9+
| 0.3.0 | 01.30.2019 | Preliminary formatting support. |
10+
| 0.3.1 | 05.08.2021 | Back to working state. |
11+
| 0.3.2 | 01.21.2022 | Allow non-whitespace before html tag thanks to @P-Froggy. |
12+
| 0.3.5 | 01.29.2022 | Revert @P-Froggy change while still allowing non-whitespace before tags. |
13+
| 0.3.6 | 09.15.2022 | Fix for typescriptreact files, as well as new snippets for easier block creation. |
14+
| 0.3.7 | 03.04.2023 | Added support for style tags highlighting/completion/hover. |
15+
| 0.3.8 | 04.10.2023 | Fixed regression in 0.3.7 that resulted in issue #39. |
16+
| 0.3.9 | 11.10.2023 | Added support for case insensitive blocks to fix #44. |
17+
| 0.3.10 | 03.24.2024 | Avoid matching `html` using a negative lookahead fixes #52 |

client/providers/css.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/providers/hover.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/providers/html.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/providers/style.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "inline-html",
33
"displayName": "Inline HTML",
44
"description": "IntelliSense, Emmet and Syntax Highlighting for html/css inside ES6 Template Strings.",
5-
"version": "0.3.9",
5+
"version": "0.3.10",
66
"publisher": "pushqrdx",
77
"license": "MIT",
88
"icon": "docs/logo.png",

server/providers/css.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { CompletionsCache } from '../cache'
3434
export class HTMLStyleCompletionItemProvider implements CompletionItemProvider {
3535
private _cssLanguageService: CSSLanguageService = GetCSSLanguageService()
3636
private _HTMLanguageService: HTMLanguageService = GetHTMLanguageService()
37-
private _expression = /(\/\*\s*html\s*\*\/\s*`|html\s*`)([^`]*)(`)/gi
37+
private _expression = /(\/\*\s*html\s*\*\/\s*`|(?<!`)html\s*`)([^`]*)(`)/gi
3838
private _cache = new CompletionsCache()
3939

4040
public provideCompletionItems(
@@ -134,7 +134,7 @@ export class HTMLStyleCompletionItemProvider implements CompletionItemProvider {
134134

135135
export class CSSCompletionItemProvider implements CompletionItemProvider {
136136
private _CSSLanguageService: CSSLanguageService = GetCSSLanguageService()
137-
private _expression = /(\/\*\s*(css|less|scss)\s*\*\/\s*`|css\s*`)([^`]*)(`)/gi
137+
private _expression = /(\/\*\s*(css|less|scss)\s*\*\/\s*`|(?<!`)(?:css|less|scss)\s*`)([^`]*)(`)/gi
138138
private _cache = new CompletionsCache()
139139

140140
public provideCompletionItems(

server/providers/hover.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import { CreateVirtualDocument, MatchOffset } from '../util'
2121
export class HTMLHoverProvider implements HoverProvider {
2222
private _htmlLanguageService: HtmlLanguageService = GetHtmlLanguageService()
2323
private _cssLanguageService: CssLanguageService = GetCssLanguageService()
24-
// private _expression = /(html\s*`)([^`]*)(`)/g
25-
private _expression = /(\/\*\s*html\s*\*\/\s*`|html\s*`)([^`]*)(`)/gi
24+
private _expression = /(\/\*\s*html\s*\*\/\s*`|(?<!`)html\s*`)([^`]*)(`)/gi
2625

2726

2827
provideHover(

server/providers/html.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ import { CompletionsCache } from '../cache'
2626

2727
export class HTMLCompletionItemProvider implements CompletionItemProvider {
2828
private _htmlLanguageService: HTMLanguageService = GetHTMLanguageService()
29-
private _expression = /(\/\*\s*html\s*\*\/\s*`|html\s*`)([^`]*)(`)/gi
30-
// private _expression = /(html\s*`)([^`]*)(`)/g
29+
private _expression = /(\/\*\s*html\s*\*\/\s*`|(?<!`)html\s*`)([^`]*)(`)/gi
3130
private _cache = new CompletionsCache()
3231

3332
public provideCompletionItems(

server/providers/style.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { CompletionsCache } from '../cache'
3333

3434
export class StyleCompletionItemProvider implements CompletionItemProvider {
3535
private _CSSLanguageService: CSSLanguageService = GetCSSLanguageService()
36-
private _expression = /(\/\*\s*(style)\s*\*\/\s*`|style\s*`)([^`]*)(`)/gi
36+
private _expression = /(\/\*\s*(style)\s*\*\/\s*`|(?<!`)style\s*`)([^`]*)(`)/gi
3737
private _cache = new CompletionsCache()
3838

3939
public provideCompletionItems(

0 commit comments

Comments
 (0)