Skip to content

Commit

Permalink
fixes issue with extra line number in JavaScript Editor (#3962)
Browse files Browse the repository at this point in the history
  • Loading branch information
haroon10725 authored Jul 30, 2024
1 parent 07f9707 commit 72dcdea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/widgets/jseditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ class JSEditor {
_setLinesCount(code) {
if (!docById("editorLines")) return;

const linesCount = code.replace(/\n+$/, "\n").split("\n").length + 1;
const linesCount = code.replace(/\n+$/, "\n").split("\n").length;
let text = "";
for (let i = 1; i < linesCount; i++) {
text += `${i}\n`;
Expand Down

0 comments on commit 72dcdea

Please sign in to comment.