Skip to content

Commit db4035c

Browse files
Ecmel ErcanEcmel Ercan
authored andcommitted
Fixes
1 parent e07bd82 commit db4035c

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CSS support for HTML documents.
88
- Style attribute completion and hover.
99
- Id attribute completion.
1010
- Class attribute completion.
11-
- Supports Zen Coding completion for id and class attributes
11+
- Supports Zen Coding completion for id and class attributes.
1212
- Scans workspace folder for css files.
1313
- Supports optional resource.json file for fine tuned resource selection.
1414
- Uses [vscode-css-languageservice](https://github.com/Microsoft/vscode-css-languageservice).

package.json

Lines changed: 1 addition & 1 deletion
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 support for HTML documents",
5-
"version": "0.0.24",
5+
"version": "0.0.25",
66
"publisher": "ecmel",
77
"license": "MIT",
88
"homepage": "https://github.com/ecmel/vscode-html-css",

src/extension.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ class Snippet {
4141

4242
class StyleServer implements vsc.CompletionItemProvider, vsc.HoverProvider {
4343

44-
private regex = [/style=["|']([^"^']*$)/i, /<style[\s\S]*>([^<]*$)/i];
44+
private regex = [
45+
/style=["|']([^"^']*$)/i,
46+
/<style[^\<\s\S]*\>([^\<]*)/i
47+
];
4548

4649
private convertCompletionList(list: lst.CompletionList): vsc.CompletionList {
4750
let ci: vsc.CompletionItem[] = [];
@@ -102,7 +105,11 @@ class StyleServer implements vsc.CompletionItemProvider, vsc.HoverProvider {
102105

103106
class ClassServer implements vsc.CompletionItemProvider {
104107

105-
private regex = [/(class|id)=["|']([^"^']*$)/i, /<style[\s\S]*>([\s\S]*)<\/style>/ig, /(\.|\#)[^\.^\#^\<^\>]*$/i];
108+
private regex = [
109+
/(class|id)=["|']([^"^']*$)/i,
110+
/<style[\s\S]*>([\s\S]*)<\/style>/ig,
111+
/(\.|\#)[^\.^\#^\<^\>]*$/i
112+
];
106113

107114
provideCompletionItems(document: vsc.TextDocument, position: vsc.Position, token: vsc.CancellationToken): vsc.CompletionList {
108115
let start = new vsc.Position(0, 0);

0 commit comments

Comments
 (0)