fix css context check
parent
b5daeb43c3
commit
e0093b7404
|
@ -1,5 +1,5 @@
|
|||
import { TextDocument, Position } from 'vscode-languageserver'
|
||||
import { isInsideTag, isVueDoc, isSvelteDoc } from './html'
|
||||
import { isInsideTag, isVueDoc, isSvelteDoc, isHtmlDoc } from './html'
|
||||
import { State } from './state'
|
||||
|
||||
export const CSS_LANGUAGES = [
|
||||
|
@ -28,7 +28,7 @@ export function isCssContext(
|
|||
return true
|
||||
}
|
||||
|
||||
if (isVueDoc(doc) || isSvelteDoc(doc)) {
|
||||
if (isHtmlDoc(state, doc) || isVueDoc(doc) || isSvelteDoc(doc)) {
|
||||
let str = doc.getText({
|
||||
start: { line: 0, character: 0 },
|
||||
end: position,
|
||||
|
|
Loading…
Reference in New Issue