aboutsummaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorolOwOlo <26087907+olOwOlo@users.noreply.github.com>2018-01-10 16:21:01 +0800
committerolOwOlo <26087907+olOwOlo@users.noreply.github.com>2018-01-10 16:21:01 +0800
commit5e2df2d9db1de8e52c209b0597bd8b152381e914 (patch)
tree23364465c73fde0d2f57109dcb63fc53e76aaca0 /src/js
parent5ec874d64e1fe31278acde1b1444b26620a0fbc8 (diff)
fix: missing last line of code in blogdown (#19)
release 2.7.1
Diffstat (limited to 'src/js')
-rw-r--r--src/js/even.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/js/even.js b/src/js/even.js
index 48db08c..33ca2f3 100644
--- a/src/js/even.js
+++ b/src/js/even.js
@@ -144,7 +144,8 @@ Even.highlight = function () {
for (let i = 0; i < blocks.length; i++) {
const block = blocks[i]
const rootElement = block.parentElement
- const lineCodes = block.innerHTML.split(/\n/).slice(0, -1)
+ const lineCodes = block.innerHTML.split(/\n/)
+ if (lineCodes[lineCodes.length - 1] === '') lineCodes.pop()
const lineLength = lineCodes.length
let codeLineHtml = ''