From 46479b4d2c0488926bce09efc1b3d215bf090608 Mon Sep 17 00:00:00 2001 From: moisseev Date: Wed, 15 Jul 2020 16:21:00 +0300 Subject: [Minor] Fix line count calculation --- interface/js/lib/linenumbers.min.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'interface') diff --git a/interface/js/lib/linenumbers.min.js b/interface/js/lib/linenumbers.min.js index 1b8312009..850f6d065 100644 --- a/interface/js/lib/linenumbers.min.js +++ b/interface/js/lib/linenumbers.min.js @@ -1,5 +1,6 @@ /*! * CodeJar 3.1.0 helper: lineNumbers (https://github.com/antonmedv/codejar) * Copyright (c) 2020, Anton Medvedev, MIT + * Added line count fix (https://github.com/antonmedv/codejar/pull/26/commits/245e213622ef60574ae76d9b7969b43249c592f5) */ -function withLineNumbers(e,t={}){const o=Object.assign({class:"codejar-linenumbers",wrapClass:"codejar-wrap",width:"35px",backgroundColor:"rgba(128, 128, 128, 0.15)",color:""},t);let l;return function(t){e(t),l||(l=init(t,o));const n=(t.textContent||"").replace(/\n+$/,"\n").split("\n").length+1;let s="";for(let e=1;e