Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsn committed Dec 28, 2023
1 parent a61d29f commit b1be178
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/parser/style/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,14 @@ function transformChild(
}
}

function toRange(source: postcss.Source | undefined, code: string): [number, number] {
const start = source?.start
? source.start.offset
: 0
function toRange(
source: postcss.Source | undefined,
code: string,
): [number, number] {
const start = source?.start ? source.start.offset : 0

// The postcss end position is short by one
const end = source?.end
? source.end.offset
: code.length
const end = source?.end ? source.end.offset : code.length

return [start, end]
}
Expand Down

0 comments on commit b1be178

Please sign in to comment.