Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmel committed Dec 31, 2023
1 parent 9eea746 commit b4a30f4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Validates all `class` attributes in the active editor.

### Clear style cache

Clears stylesheet cache.
Clears style cache.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*/

import {
ExtensionContext,
commands,
ExtensionContext,
languages,
window,
workspace,
Expand Down
6 changes: 3 additions & 3 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ export interface Style {

export function parse(text: string) {
const styles: Style[] = [];
const lc = lineColumn(text);
const lc = lineColumn(text, { origin: 0 });
let match, lci, index;
let line = 0;
let col = 0;
while ((match = regex.exec(text))) {
index = match.index;
lci = lc.fromIndex(index);
if (lci) {
line = lci.line - 1;
col = lci.col;
line = lci.line;
col = lci.col + 1;
}
styles.push({
index,
Expand Down
2 changes: 1 addition & 1 deletion test/suite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function run(): Promise<void> {
return new Promise((resolve, reject) => {
glob("**/**.test.js", { cwd: testsRoot })
.then((files) => {
files.forEach((f) => mocha.addFile(path.resolve(testsRoot, f)));
files.forEach((file) => mocha.addFile(path.resolve(testsRoot, file)));
try {
mocha.run((failures) => {
if (failures > 0) {
Expand Down

0 comments on commit b4a30f4

Please sign in to comment.