bug修复
parent
2b1278bc74
commit
e3be6889ac
|
@ -1,6 +1,7 @@
|
||||||
**/*.vsix
|
**/*.vsix
|
||||||
**/*.js.map
|
**/*.js.map
|
||||||
node_modules
|
node_modules
|
||||||
client
|
dist
|
||||||
.vscode
|
.vscode
|
||||||
.DS_STORE
|
.DS_STORE
|
||||||
|
package-lock.json
|
|
@ -1,6 +1,6 @@
|
||||||
**/*.ts
|
**/*.ts
|
||||||
**/tsconfig.json
|
**/tsconfig.json
|
||||||
server/**
|
src/**
|
||||||
tests/**
|
tests/**
|
||||||
.vscode/**
|
.vscode/**
|
||||||
.gitignore
|
.gitignore
|
||||||
|
|
10
package.json
10
package.json
|
@ -2,10 +2,10 @@
|
||||||
"name": "string-html-css",
|
"name": "string-html-css",
|
||||||
"displayName": "string-html-css",
|
"displayName": "string-html-css",
|
||||||
"description": "一个高亮js代码中的 html/css/scss/sass/less的字符串, 并支持emmet.",
|
"description": "一个高亮js代码中的 html/css/scss/sass/less的字符串, 并支持emmet.",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"publisher": "yutent",
|
"publisher": "yutent",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"icon": "docs/logo.png",
|
"icon": "assets/logo.png",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/yutent/vscode-string-html/issues"
|
"url": "https://github.com/yutent/vscode-string-html/issues"
|
||||||
},
|
},
|
||||||
|
@ -24,9 +24,8 @@
|
||||||
"vscode": "^1.22.0"
|
"vscode": "^1.22.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile": "npx tsc -p .",
|
"start": "npx tsc --watch -p .",
|
||||||
"watch:compile": "npx tsc --watch -p .",
|
"build": "npx tsc -p ."
|
||||||
"package": "npx vsce package"
|
|
||||||
},
|
},
|
||||||
"categories": [
|
"categories": [
|
||||||
"Programming Languages"
|
"Programming Languages"
|
||||||
|
@ -116,7 +115,6 @@
|
||||||
"@types/node": "7.0.43",
|
"@types/node": "7.0.43",
|
||||||
"@types/vscode": "^1.22.0",
|
"@types/vscode": "^1.22.0",
|
||||||
"typescript": "^3.2.2",
|
"typescript": "^3.2.2",
|
||||||
"vsce": "^1.102.0",
|
|
||||||
"vscode-languageserver-types": "^3.6.0"
|
"vscode-languageserver-types": "^3.6.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import {
|
||||||
} from 'vscode-html-languageservice'
|
} from 'vscode-html-languageservice'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getCSSLanguageService as GetCSSLanguageService,
|
getSCSSLanguageService as GetSCSSLanguageService,
|
||||||
LanguageService as CSSLanguageService,
|
LanguageService as CSSLanguageService,
|
||||||
CompletionList as CSSCompletionList
|
CompletionList as CSSCompletionList
|
||||||
} from 'vscode-css-languageservice'
|
} from 'vscode-css-languageservice'
|
||||||
|
@ -32,7 +32,7 @@ import {
|
||||||
import { CompletionsCache } from '../cache'
|
import { CompletionsCache } from '../cache'
|
||||||
|
|
||||||
export class HTMLStyleCompletionItemProvider implements CompletionItemProvider {
|
export class HTMLStyleCompletionItemProvider implements CompletionItemProvider {
|
||||||
private _cssLanguageService: CSSLanguageService = GetCSSLanguageService()
|
private _cssLanguageService: CSSLanguageService = GetSCSSLanguageService()
|
||||||
private _HTMLanguageService: HTMLanguageService = GetHTMLanguageService()
|
private _HTMLanguageService: HTMLanguageService = GetHTMLanguageService()
|
||||||
private _expression = /(\/\*\s*html\s*\*\/\s*`|html\s*`)([^`]*)(`)/g
|
private _expression = /(\/\*\s*html\s*\*\/\s*`|html\s*`)([^`]*)(`)/g
|
||||||
private _cache = new CompletionsCache()
|
private _cache = new CompletionsCache()
|
||||||
|
@ -130,9 +130,9 @@ export class HTMLStyleCompletionItemProvider implements CompletionItemProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CSSCompletionItemProvider implements CompletionItemProvider {
|
export class CSSCompletionItemProvider implements CompletionItemProvider {
|
||||||
private _CSSLanguageService: CSSLanguageService = GetCSSLanguageService()
|
private _CSSLanguageService: CSSLanguageService = GetSCSSLanguageService()
|
||||||
private _expression =
|
private _expression =
|
||||||
/(\/\*\s*(css|less|scss|sass)\s*\*\/\s*`|(scss|sass|less|css)\s*`)([^`]*)(`)/g
|
/(\/\*\s*(css|less|scss|sass)\s*\*\/\s*`|css\s*`)([^`]*)(`)/g
|
||||||
private _cache = new CompletionsCache()
|
private _cache = new CompletionsCache()
|
||||||
|
|
||||||
public provideCompletionItems(
|
public provideCompletionItems(
|
||||||
|
|
|
@ -12,7 +12,6 @@ import {
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getLanguageService as GetHTMLanguageService,
|
getLanguageService as GetHTMLanguageService,
|
||||||
TextDocument as HTMLTextDocument,
|
|
||||||
Position as HTMLPosition
|
Position as HTMLPosition
|
||||||
} from 'vscode-html-languageservice'
|
} from 'vscode-html-languageservice'
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
"include": "source.ts#template-substitution-element"
|
"include": "source.ts#template-substitution-element"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"include": "source.css"
|
"include": "source.css.scss"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue