coc-class-css
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "coc-class-css", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "CSS class completions in html markup everywhere", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -263,9 +263,14 @@ import fs from 'node:fs/promises'; | ||
n.selectors | ||
.filter((s) => s[0] === '.') | ||
.map((s) => { | ||
const idx = s.indexOf('.'); | ||
return idx !== -1 ? s.substring(idx + 1) : undefined; | ||
}) | ||
.forEach((s) => { | ||
const idx = s.indexOf(' '); | ||
if (idx !== -1) { | ||
selectors.add({ token: s.substring(1, idx), pathRelative, source: lines.join('\n') }); | ||
} else { | ||
selectors.add({ token: s.substring(1), pathRelative, source: lines.join('\n') }); | ||
if (s) { | ||
const idx = s.indexOf(' '); | ||
selectors.add({ | ||
token: idx == -1 ? s : s.substring(0, idx), | ||
pathRelative, | ||
source: lines.join('\n'), | ||
}); | ||
} | ||
@@ -272,0 +277,0 @@ }); |
Sorry, the diff of this file is too big to display
279833
1218