diff options
author | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2018-01-10 16:21:01 +0800 |
---|---|---|
committer | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2018-01-10 16:21:01 +0800 |
commit | 5e2df2d9db1de8e52c209b0597bd8b152381e914 (patch) | |
tree | 23364465c73fde0d2f57109dcb63fc53e76aaca0 /src | |
parent | 5ec874d64e1fe31278acde1b1444b26620a0fbc8 (diff) |
fix: missing last line of code in blogdown (#19)
release 2.7.1
Diffstat (limited to 'src')
-rw-r--r-- | src/js/even.js | 3 | ||||
-rw-r--r-- | src/package.json | 27 | ||||
-rw-r--r-- | src/webpack.config.js | 4 |
3 files changed, 18 insertions, 16 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 = '' diff --git a/src/package.json b/src/package.json index 69bb8fe..dcae54f 100644 --- a/src/package.json +++ b/src/package.json @@ -1,30 +1,31 @@ { "name": "even-src", - "version": "2.7.0", + "version": "2.7.1", "description": "even source file", "main": "index.js", "scripts": { - "start": "webpack" + "start": "webpack", + "build": "webpack" }, "author": "ahonn, olOwOlo", "license": "MIT", "devDependencies": { - "autoprefixer": "^7.1.5", + "autoprefixer": "^7.2.4", "babel-core": "^6.26.0", "babel-loader": "^7.1.2", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-es2015": "^6.24.1", "babel-preset-stage-2": "^6.24.1", - "css-loader": "^0.28.5", - "expose-loader": "^0.7.3", - "extract-text-webpack-plugin": "^3.0.0", - "file-loader": "^0.11.2", - "node-sass": "^4.5.3", - "postcss-loader": "^2.0.7", + "css-loader": "^0.28.8", + "expose-loader": "^0.7.4", + "extract-text-webpack-plugin": "^3.0.2", + "file-loader": "^1.1.6", + "node-sass": "^4.7.2", + "postcss-loader": "^2.0.10", "sass-loader": "^6.0.6", - "style-loader": "^0.18.2", - "uglifyjs-webpack-plugin": "^0.4.6", - "url-loader": "^0.5.9", - "webpack": "^3.7.1" + "style-loader": "^0.19.1", + "uglifyjs-webpack-plugin": "^1.1.6", + "url-loader": "^0.6.2", + "webpack": "^3.10.0" } } diff --git a/src/webpack.config.js b/src/webpack.config.js index 01c91e6..f2218be 100644 --- a/src/webpack.config.js +++ b/src/webpack.config.js @@ -1,5 +1,5 @@ const path = require('path') -const ExtractTextPlugin = require("extract-text-webpack-plugin") +const ExtractTextPlugin = require('extract-text-webpack-plugin') const UglifyJSPlugin = require('uglifyjs-webpack-plugin') const extractSass = new ExtractTextPlugin({ @@ -18,7 +18,7 @@ module.exports = { module: { rules: [ { - test: /\.js$/, + test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' }, |