From: moisseev Date: Wed, 15 Jul 2020 13:21:00 +0000 (+0300) Subject: [Minor] Fix line count calculation X-Git-Tag: 2.6~231^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46479b4d2c0488926bce09efc1b3d215bf090608;p=thirdparty%2Frspamd.git [Minor] Fix line count calculation --- diff --git a/interface/js/lib/linenumbers.min.js b/interface/js/lib/linenumbers.min.js index 1b83120092..850f6d0659 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