Skip to content

Commit ffb76de

Browse files
committed
enhanced parser regex
1 parent ac56f76 commit ffb76de

File tree

5 files changed

+8
-21
lines changed

5 files changed

+8
-21
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
All notable changes to the extension will be documented in this file.
44

5-
## [2.0.0] - 2023-12-31
5+
## [2.0.1] - 2023-12-31
66

77
- Go to definition support.
88
- Ported to custom parser.

README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,6 @@ Configuration depends on your layout of the project but some samples are below:
8585
}
8686
```
8787

88-
### EJS
89-
90-
```json
91-
{
92-
"css.enabledLanguages": ["ejs"]
93-
}
94-
```
95-
96-
```json
97-
{
98-
"css.styleSheets": ["src/**/*.ejs"]
99-
}
100-
```
101-
10288
## Commands
10389

10490
### Validate selectors

package-lock.json

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-html-css",
33
"displayName": "HTML CSS Support",
44
"description": "CSS Intellisense for HTML",
5-
"version": "2.0.0",
5+
"version": "2.0.1",
66
"license": "MIT",
77
"publisher": "ecmel",
88
"author": {
@@ -91,8 +91,8 @@
9191
"compile": "tsc -p ./ --outDir out --sourceMap true --module commonjs --moduleResolution node",
9292
"pretest": "npm run build && npm run compile",
9393
"test": "node ./out/test/runTest.js",
94-
"coverage": "c8 --all --src out npm run test",
95-
"update": "ncu -x @types/vscode -x prettier",
94+
"coverage": "c8 --src out npm run test",
95+
"update": "ncu -u -x prettier -x @types/vscode",
9696
"vscode:prepublish": "npm run build",
9797
"package": "vsce package",
9898
"publish": "vsce publish"

src/parser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
import lineColumn from "line-column";
77

8-
const regex = /([.#])(-?[_a-zA-Z]+[_a-zA-Z0-9-]*)(?=.*?{[^}]*})/gs;
8+
const regex =
9+
/([.#])(-?[_a-zA-Z]+[_a-zA-Z0-9-]*)(?=[\s,.#_a-zA-Z0-9-]*{[^}]*})/g;
910

1011
export const enum StyleType {
1112
ID = "#",

0 commit comments

Comments
 (0)