Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ivojawer committed Jun 24, 2024
1 parent 500dd9f commit 78ebd0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/extensions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {EOL} from 'os'
export const keys = Object.keys as <T>(o: T) => (Extract<keyof T, string>)[]

export const last = <T>(xs: ReadonlyArray<T>): T | undefined => xs[xs.length - 1]
Expand Down
4 changes: 2 additions & 2 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ export const sanitizeWhitespaces = (originalFrom: SourceIndex, originalTo: Sourc
to.line--
const nodeLines = input.substring(from.offset, to.offset - EOL.length).split(EOL)
const lastLine = nodeLines.pop()!
to.column = lastLine.length + ( nodeLines.length == 0 ?
to.column = lastLine.length + ( nodeLines.length == 0 ?
from.column // one-line
: 1 // base 1
)
to.offset -= EOL.length
} else {
to.column--
to.offset--;
to.offset--
}
}
return [from, to]
Expand Down

0 comments on commit 78ebd0d

Please sign in to comment.