Skip to content

Commit

Permalink
Merge branch 'main' of github.com:julianpoemp/codejar-linenumbers
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpoemp committed Oct 28, 2023
2 parents 5ae0fa5 + 6c2b75d commit cc009b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codejar-linenumbers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function withLineNumbers(
}

const code = editor.textContent || ""
const linesCount = code.replace(/\n\n$/g, "\n").split("\n").length
const linesCount = code.replace(/\n$/g, "").split("\n").length

let text = ""
for (let i = 0; i < linesCount; i++) {
Expand Down

0 comments on commit cc009b5

Please sign in to comment.