hexo-util
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -1,1 +0,1 @@ | ||
{"languages":["1c","abnf","accesslog","actionscript","ada","angelscript","apache","applescript","arcade","c-like","cpp","arduino","armasm","xml","asciidoc","aspectj","autohotkey","autoit","avrasm","awk","axapta","bash","basic","bnf","brainfuck","c","cal","capnproto","ceylon","clean","clojure","clojure-repl","cmake","coffeescript","coq","cos","crmsh","crystal","csharp","csp","css","d","markdown","dart","delphi","diff","django","dns","dockerfile","dos","dsconfig","dts","dust","ebnf","elixir","elm","ruby","erb","erlang-repl","erlang","excel","fix","flix","fortran","fsharp","gams","gauss","gcode","gherkin","glsl","gml","go","golo","gradle","groovy","haml","handlebars","haskell","haxe","hsp","htmlbars","http","hy","inform7","ini","irpf90","isbl","java","javascript","jboss-cli","json","julia","julia-repl","kotlin","lasso","latex","ldif","leaf","less","lisp","livecodeserver","livescript","llvm","lsl","lua","makefile","mathematica","matlab","maxima","mel","mercury","mipsasm","mizar","perl","mojolicious","monkey","moonscript","n1ql","nginx","nim","nix","nsis","objectivec","ocaml","openscad","oxygene","parser3","pf","pgsql","php","php-template","plaintext","pony","powershell","processing","profile","prolog","properties","protobuf","puppet","purebasic","python","python-repl","q","qml","r","reasonml","rib","roboconf","routeros","rsl","ruleslanguage","rust","sas","scala","scheme","scilab","scss","shell","smali","smalltalk","sml","sqf","sql","stan","stata","step21","stylus","subunit","swift","taggerscript","yaml","tap","tcl","thrift","tp","twig","typescript","vala","vbnet","vbscript","vbscript-html","verilog","vhdl","vim","x86asm","xl","xquery","zephir"],"aliases":{"1c":"1c","abnf":"abnf","accesslog":"accesslog","actionscript":"actionscript","as":"actionscript","ada":"ada","angelscript":"angelscript","asc":"angelscript","apache":"apache","apacheconf":"apache","applescript":"applescript","osascript":"applescript","arcade":"arcade","c-like":"c-like","c":"c","cc":"arduino","h":"c","c++":"arduino","h++":"arduino","hpp":"arduino","hh":"arduino","hxx":"arduino","cxx":"arduino","cpp":"cpp","arduino":"arduino","armasm":"armasm","arm":"armasm","xml":"xml","html":"xml","xhtml":"xml","rss":"xml","atom":"xml","xjb":"xml","xsd":"xml","xsl":"xml","plist":"xml","wsf":"xml","svg":"xml","asciidoc":"asciidoc","adoc":"asciidoc","aspectj":"aspectj","autohotkey":"autohotkey","ahk":"autohotkey","autoit":"autoit","avrasm":"avrasm","awk":"awk","axapta":"axapta","bash":"bash","sh":"bash","zsh":"bash","basic":"basic","bnf":"bnf","brainfuck":"brainfuck","bf":"brainfuck","cal":"cal","capnproto":"capnproto","capnp":"capnproto","ceylon":"ceylon","clean":"clean","icl":"clean","dcl":"clean","clojure":"clojure","clj":"clojure","clojure-repl":"clojure-repl","cmake":"cmake","cmake.in":"cmake","coffeescript":"coffeescript","coffee":"coffeescript","cson":"coffeescript","iced":"coffeescript","coq":"coq","cos":"cos","cls":"cos","crmsh":"crmsh","crm":"crmsh","pcmk":"crmsh","crystal":"crystal","cr":"crystal","csharp":"csharp","cs":"csharp","c#":"csharp","csp":"csp","css":"css","d":"d","markdown":"markdown","md":"markdown","mkdown":"markdown","mkd":"markdown","dart":"dart","delphi":"delphi","dpr":"delphi","dfm":"delphi","pas":"delphi","pascal":"delphi","freepascal":"delphi","lazarus":"delphi","lpr":"delphi","lfm":"delphi","diff":"diff","patch":"diff","django":"django","jinja":"django","dns":"dns","bind":"dns","zone":"dns","dockerfile":"dockerfile","docker":"dockerfile","dos":"dos","bat":"dos","cmd":"dos","dsconfig":"dsconfig","dts":"dts","dust":"dust","dst":"dust","ebnf":"ebnf","elixir":"elixir","elm":"elm","ruby":"ruby","rb":"ruby","gemspec":"ruby","podspec":"ruby","thor":"ruby","irb":"ruby","erb":"erb","erlang-repl":"erlang-repl","erlang":"erlang","erl":"erlang","excel":"excel","xlsx":"excel","xls":"excel","fix":"fix","flix":"flix","fortran":"fortran","f90":"fortran","f95":"fortran","fsharp":"fsharp","fs":"fsharp","gams":"gams","gms":"gams","gauss":"gauss","gss":"gauss","gcode":"gcode","nc":"gcode","gherkin":"gherkin","feature":"gherkin","glsl":"glsl","gml":"gml","GML":"gml","go":"go","golang":"go","golo":"golo","gradle":"gradle","groovy":"groovy","haml":"haml","handlebars":"handlebars","hbs":"htmlbars","html.hbs":"htmlbars","html.handlebars":"htmlbars","htmlbars":"htmlbars","haskell":"haskell","hs":"haskell","haxe":"haxe","hx":"haxe","hsp":"hsp","http":"http","https":"http","hy":"hy","hylang":"hy","inform7":"inform7","i7":"inform7","ini":"ini","toml":"ini","irpf90":"irpf90","isbl":"isbl","java":"java","jsp":"java","javascript":"javascript","js":"javascript","jsx":"javascript","mjs":"javascript","cjs":"javascript","jboss-cli":"jboss-cli","wildfly-cli":"jboss-cli","json":"json","julia":"julia","julia-repl":"julia-repl","kotlin":"kotlin","kt":"kotlin","lasso":"lasso","ls":"livescript","lassoscript":"lasso","latex":"latex","tex":"latex","ldif":"ldif","leaf":"leaf","less":"less","lisp":"lisp","livecodeserver":"livecodeserver","livescript":"livescript","llvm":"llvm","lsl":"lsl","lua":"lua","makefile":"makefile","mk":"makefile","mak":"makefile","mathematica":"mathematica","mma":"mathematica","wl":"mathematica","matlab":"matlab","maxima":"maxima","mel":"mel","mercury":"mercury","m":"mercury","moo":"mercury","mipsasm":"mipsasm","mips":"mipsasm","mizar":"mizar","perl":"perl","pl":"perl","pm":"perl","mojolicious":"mojolicious","monkey":"monkey","moonscript":"moonscript","moon":"moonscript","n1ql":"n1ql","nginx":"nginx","nginxconf":"nginx","nim":"nim","nix":"nix","nixos":"nix","nsis":"nsis","objectivec":"objectivec","mm":"objectivec","objc":"objectivec","obj-c":"objectivec","ocaml":"ocaml","ml":"sml","openscad":"openscad","scad":"openscad","oxygene":"oxygene","parser3":"parser3","pf":"pf","pf.conf":"pf","pgsql":"pgsql","postgres":"pgsql","postgresql":"pgsql","php":"php","php3":"php","php4":"php","php5":"php","php6":"php","php7":"php","php-template":"php-template","plaintext":"plaintext","text":"plaintext","txt":"plaintext","pony":"pony","powershell":"powershell","ps":"powershell","ps1":"powershell","processing":"processing","profile":"profile","prolog":"prolog","properties":"properties","protobuf":"protobuf","puppet":"puppet","pp":"puppet","purebasic":"purebasic","pb":"purebasic","pbi":"purebasic","python":"python","py":"python","gyp":"python","ipython":"python","python-repl":"python-repl","pycon":"python-repl","q":"q","k":"q","kdb":"q","qml":"qml","qt":"qml","r":"r","reasonml":"reasonml","re":"reasonml","rib":"rib","roboconf":"roboconf","graph":"roboconf","instances":"roboconf","routeros":"routeros","mikrotik":"routeros","rsl":"rsl","ruleslanguage":"ruleslanguage","rust":"rust","rs":"rust","sas":"sas","SAS":"sas","scala":"scala","scheme":"scheme","scilab":"scilab","sci":"scilab","scss":"scss","shell":"shell","console":"shell","smali":"smali","smalltalk":"smalltalk","st":"smalltalk","sml":"sml","sqf":"sqf","sql":"sql","stan":"stan","stanfuncs":"stan","stata":"stata","do":"stata","ado":"stata","step21":"step21","p21":"step21","step":"step21","stp":"step21","stylus":"stylus","styl":"stylus","subunit":"subunit","swift":"swift","taggerscript":"taggerscript","yaml":"yaml","yml":"yaml","YAML":"yaml","tap":"tap","tcl":"tcl","tk":"tcl","thrift":"thrift","tp":"tp","twig":"twig","craftcms":"twig","typescript":"typescript","ts":"typescript","vala":"vala","vbnet":"vbnet","vb":"vbnet","vbscript":"vbscript","vbs":"vbscript","vbscript-html":"vbscript-html","verilog":"verilog","v":"verilog","sv":"verilog","svh":"verilog","vhdl":"vhdl","vim":"vim","x86asm":"x86asm","xl":"xl","tao":"xl","xquery":"xquery","xpath":"xquery","xq":"xquery","zephir":"zephir","zep":"zephir"}} | ||
{"languages":["1c","abnf","accesslog","actionscript","ada","angelscript","apache","applescript","arcade","cpp","arduino","armasm","xml","asciidoc","aspectj","autohotkey","autoit","avrasm","awk","axapta","bash","basic","bnf","brainfuck","cal","capnproto","ceylon","clean","clojure","clojure-repl","cmake","coffeescript","coq","cos","crmsh","crystal","cs","csp","css","d","markdown","dart","delphi","diff","django","dns","dockerfile","dos","dsconfig","dts","dust","ebnf","elixir","elm","ruby","erb","erlang-repl","erlang","excel","fix","flix","fortran","fsharp","gams","gauss","gcode","gherkin","glsl","gml","go","golo","gradle","groovy","haml","handlebars","haskell","haxe","hsp","htmlbars","http","hy","inform7","ini","irpf90","isbl","java","javascript","jboss-cli","json","julia","julia-repl","kotlin","lasso","ldif","leaf","less","lisp","livecodeserver","livescript","llvm","lsl","lua","makefile","mathematica","matlab","maxima","mel","mercury","mipsasm","mizar","perl","mojolicious","monkey","moonscript","n1ql","nginx","nimrod","nix","nsis","objectivec","ocaml","openscad","oxygene","parser3","pf","pgsql","php","plaintext","pony","powershell","processing","profile","prolog","properties","protobuf","puppet","purebasic","python","q","qml","r","reasonml","rib","roboconf","routeros","rsl","ruleslanguage","rust","sas","scala","scheme","scilab","scss","shell","smali","smalltalk","sml","sqf","sql","stan","stata","step21","stylus","subunit","swift","taggerscript","yaml","tap","tcl","tex","thrift","tp","twig","typescript","vala","vbnet","vbscript","vbscript-html","verilog","vhdl","vim","x86asm","xl","xquery","zephir"],"aliases":{"1c":"1c","abnf":"abnf","accesslog":"accesslog","actionscript":"actionscript","as":"actionscript","ada":"ada","angelscript":"angelscript","asc":"angelscript","apache":"apache","apacheconf":"apache","applescript":"applescript","osascript":"applescript","arcade":"arcade","cpp":"cpp","c":"cpp","cc":"cpp","h":"cpp","c++":"cpp","h++":"cpp","hpp":"cpp","arduino":"arduino","armasm":"armasm","arm":"armasm","xml":"xml","html":"xml","xhtml":"xml","rss":"xml","atom":"xml","xjb":"xml","xsd":"xml","xsl":"xml","plist":"xml","asciidoc":"asciidoc","adoc":"asciidoc","aspectj":"aspectj","autohotkey":"autohotkey","ahk":"autohotkey","autoit":"autoit","avrasm":"avrasm","awk":"awk","axapta":"axapta","bash":"bash","sh":"bash","zsh":"bash","basic":"basic","bnf":"bnf","brainfuck":"brainfuck","bf":"brainfuck","cal":"cal","capnproto":"capnproto","capnp":"capnproto","ceylon":"ceylon","clean":"clean","icl":"clean","dcl":"clean","clojure":"clojure","clj":"clojure","clojure-repl":"clojure-repl","cmake":"cmake","cmake.in":"cmake","coffeescript":"coffeescript","coffee":"coffeescript","cson":"coffeescript","iced":"coffeescript","coq":"coq","cos":"cos","cls":"cos","crmsh":"crmsh","crm":"crmsh","pcmk":"crmsh","crystal":"crystal","cr":"crystal","cs":"cs","csharp":"cs","csp":"csp","css":"css","d":"d","markdown":"markdown","md":"markdown","mkdown":"markdown","mkd":"markdown","dart":"dart","delphi":"delphi","dpr":"delphi","dfm":"delphi","pas":"delphi","pascal":"delphi","freepascal":"delphi","lazarus":"delphi","lpr":"delphi","lfm":"delphi","diff":"diff","patch":"diff","django":"django","jinja":"django","dns":"dns","bind":"dns","zone":"dns","dockerfile":"dockerfile","docker":"dockerfile","dos":"dos","bat":"dos","cmd":"dos","dsconfig":"dsconfig","dts":"dts","dust":"dust","dst":"dust","ebnf":"ebnf","elixir":"elixir","elm":"elm","ruby":"ruby","rb":"ruby","gemspec":"ruby","podspec":"ruby","thor":"ruby","irb":"ruby","erb":"erb","erlang-repl":"erlang-repl","erlang":"erlang","erl":"erlang","excel":"excel","xlsx":"excel","xls":"excel","fix":"fix","flix":"flix","fortran":"fortran","f90":"fortran","f95":"fortran","fsharp":"fsharp","fs":"fsharp","gams":"gams","gms":"gams","gauss":"gauss","gss":"gauss","gcode":"gcode","nc":"gcode","gherkin":"gherkin","feature":"gherkin","glsl":"glsl","gml":"gml","GML":"gml","go":"go","golang":"go","golo":"golo","gradle":"gradle","groovy":"groovy","haml":"haml","handlebars":"handlebars","hbs":"handlebars","html.hbs":"handlebars","html.handlebars":"handlebars","haskell":"haskell","hs":"haskell","haxe":"haxe","hx":"haxe","hsp":"hsp","htmlbars":"htmlbars","http":"http","https":"http","hy":"hy","hylang":"hy","inform7":"inform7","i7":"inform7","ini":"ini","toml":"ini","irpf90":"irpf90","isbl":"isbl","java":"java","jsp":"java","javascript":"javascript","js":"javascript","jsx":"javascript","jboss-cli":"jboss-cli","wildfly-cli":"jboss-cli","json":"json","julia":"julia","julia-repl":"julia-repl","kotlin":"kotlin","kt":"kotlin","lasso":"lasso","ls":"livescript","lassoscript":"lasso","ldif":"ldif","leaf":"leaf","less":"less","lisp":"lisp","livecodeserver":"livecodeserver","livescript":"livescript","llvm":"llvm","lsl":"lsl","lua":"lua","makefile":"makefile","mk":"makefile","mak":"makefile","mathematica":"mathematica","mma":"mathematica","matlab":"matlab","maxima":"maxima","mel":"mel","mercury":"mercury","m":"mercury","moo":"mercury","mipsasm":"mipsasm","mips":"mipsasm","mizar":"mizar","perl":"perl","pl":"perl","pm":"perl","mojolicious":"mojolicious","monkey":"monkey","moonscript":"moonscript","moon":"moonscript","n1ql":"n1ql","nginx":"nginx","nginxconf":"nginx","nimrod":"nimrod","nim":"nimrod","nix":"nix","nixos":"nix","nsis":"nsis","objectivec":"objectivec","mm":"objectivec","objc":"objectivec","obj-c":"objectivec","ocaml":"ocaml","ml":"sml","openscad":"openscad","scad":"openscad","oxygene":"oxygene","parser3":"parser3","pf":"pf","pf.conf":"pf","pgsql":"pgsql","postgres":"pgsql","postgresql":"pgsql","php":"php","php3":"php","php4":"php","php5":"php","php6":"php","php7":"php","plaintext":"plaintext","pony":"pony","powershell":"powershell","ps":"powershell","processing":"processing","profile":"profile","prolog":"prolog","properties":"properties","protobuf":"protobuf","puppet":"puppet","pp":"puppet","purebasic":"purebasic","pb":"purebasic","pbi":"purebasic","python":"python","py":"python","gyp":"python","q":"q","k":"q","kdb":"q","qml":"qml","qt":"qml","r":"r","reasonml":"reasonml","re":"reasonml","rib":"rib","roboconf":"roboconf","graph":"roboconf","instances":"roboconf","routeros":"routeros","mikrotik":"routeros","rsl":"rsl","ruleslanguage":"ruleslanguage","rust":"rust","rs":"rust","sas":"sas","SAS":"sas","scala":"scala","scheme":"scheme","scilab":"scilab","sci":"scilab","scss":"scss","shell":"shell","console":"shell","smali":"smali","smalltalk":"smalltalk","st":"smalltalk","sml":"sml","sqf":"sqf","sql":"sql","stan":"stan","stata":"stata","do":"stata","ado":"stata","step21":"step21","p21":"step21","step":"step21","stp":"step21","stylus":"stylus","styl":"stylus","subunit":"subunit","swift":"swift","taggerscript":"taggerscript","yaml":"yaml","yml":"yaml","YAML":"yaml","tap":"tap","tcl":"tcl","tk":"tcl","tex":"tex","thrift":"thrift","tp":"tp","twig":"twig","craftcms":"twig","typescript":"typescript","ts":"typescript","vala":"vala","vbnet":"vbnet","vb":"vbnet","vbscript":"vbscript","vbs":"vbscript","vbscript-html":"vbscript-html","verilog":"verilog","v":"verilog","sv":"verilog","svh":"verilog","vhdl":"vhdl","vim":"vim","x86asm":"x86asm","xl":"xl","tao":"xl","xquery":"xquery","xpath":"xquery","xq":"xquery","zephir":"zephir","zep":"zephir"}} |
@@ -6,3 +6,2 @@ 'use strict'; | ||
const alias = require('../highlight_alias.json'); | ||
const escapeHTML = require('./escape_html'); | ||
@@ -105,47 +104,38 @@ function highlightUtil(str, options = {}) { | ||
if (!lang && autoDetect) { | ||
if (lang) { | ||
lang = lang.toLowerCase(); | ||
} else if (autoDetect) { | ||
const result = hljs.highlightAuto(str); | ||
if (result.relevance > 0 && result.language) lang = result.language; | ||
return closeTags(result); | ||
} | ||
if (!lang) { | ||
lang = 'plain'; | ||
if (!lang || !alias.aliases[lang]) { | ||
lang = 'plaintext'; | ||
} | ||
const result = { | ||
value: escapeHTML(str), | ||
language: lang.toLowerCase() | ||
}; | ||
const res = hljs.highlight(str, { | ||
language: lang, | ||
ignoreIllegals: true | ||
}); | ||
if (result.language === 'plain') { | ||
return result; | ||
} | ||
return closeTags(res); | ||
} | ||
if (!alias.aliases[result.language]) { | ||
result.language = 'plain'; | ||
return result; | ||
} | ||
// https://github.com/hexojs/hexo-util/issues/10 | ||
function closeTags(res) { | ||
const tokenStack = []; | ||
return tryHighlight(str, result.language) || result; | ||
} | ||
function tryHighlight(str, lang) { | ||
try { | ||
const matching = str.match(/(\r?\n)/); | ||
const separator = matching ? matching[1] : ''; | ||
const lines = matching ? str.split(separator) : [str]; | ||
let result = hljs.highlight(lang, lines.shift()); | ||
let html = result.value; | ||
while (lines.length > 0) { | ||
result = hljs.highlight(lang, lines.shift(), false, result.top); | ||
html += separator + result.value; | ||
res.value = res.value.split('\n').map(line => { | ||
const prepend = tokenStack.map(token => `<span class="${token}">`).join(''); | ||
const matches = line.matchAll(/(<span class="(.*?)">|<\/span>)/g); | ||
for (const match of matches) { | ||
if (match[0] === '</span>') tokenStack.shift(); | ||
else tokenStack.unshift(match[2]); | ||
} | ||
result.value = html; | ||
return result; | ||
} catch (err) { | ||
} | ||
const append = '</span>'.repeat(tokenStack.length); | ||
return prepend + line + append; | ||
}).join('\n'); | ||
return res; | ||
} | ||
module.exports = highlightUtil; |
@@ -70,3 +70,3 @@ 'use strict'; | ||
// To be consistent with highlight.js | ||
const language = lang === 'plain' || lang === 'none' ? 'none' : lang; | ||
const language = lang === 'plaintext' || lang === 'none' ? 'none' : lang; | ||
@@ -73,0 +73,0 @@ const preTagClassArr = []; |
'use strict'; | ||
module.exports = require('striptags'); | ||
const STATE_PLAINTEXT = Symbol('plaintext'); | ||
const STATE_HTML = Symbol('html'); | ||
const STATE_COMMENT = Symbol('comment'); | ||
function striptags(html = '') { | ||
let state = STATE_PLAINTEXT; | ||
let tag_buffer = ''; | ||
let depth = 0; | ||
let in_quote_char = ''; | ||
let output = ''; | ||
const { length } = html; | ||
for (let idx = 0; idx < length; idx++) { | ||
const char = html[idx]; | ||
if (state === STATE_PLAINTEXT) { | ||
switch (char) { | ||
case '<': | ||
state = STATE_HTML; | ||
tag_buffer = tag_buffer + char; | ||
break; | ||
default: | ||
output += char; | ||
break; | ||
} | ||
} else if (state === STATE_HTML) { | ||
switch (char) { | ||
case '<': | ||
// ignore '<' if inside a quote | ||
if (in_quote_char) break; | ||
// we're seeing a nested '<' | ||
depth++; | ||
break; | ||
case '>': | ||
// ignore '>' if inside a quote | ||
if (in_quote_char) { | ||
break; | ||
} | ||
// something like this is happening: '<<>>' | ||
if (depth) { | ||
depth--; | ||
break; | ||
} | ||
// this is closing the tag in tag_buffer | ||
in_quote_char = ''; | ||
state = STATE_PLAINTEXT; | ||
// tag_buffer += '>'; | ||
tag_buffer = ''; | ||
break; | ||
case '"': | ||
case '\'': | ||
// catch both single and double quotes | ||
if (char === in_quote_char) { | ||
in_quote_char = ''; | ||
} else { | ||
in_quote_char = in_quote_char || char; | ||
} | ||
tag_buffer = tag_buffer + char; | ||
break; | ||
case '-': | ||
if (tag_buffer === '<!-') { | ||
state = STATE_COMMENT; | ||
} | ||
tag_buffer = tag_buffer + char; | ||
break; | ||
case ' ': | ||
case '\n': | ||
if (tag_buffer === '<') { | ||
state = STATE_PLAINTEXT; | ||
output += '< '; | ||
tag_buffer = ''; | ||
break; | ||
} | ||
tag_buffer = tag_buffer + char; | ||
break; | ||
default: | ||
tag_buffer = tag_buffer + char; | ||
break; | ||
} | ||
} else if (state === STATE_COMMENT) { | ||
switch (char) { | ||
case '>': | ||
if (tag_buffer.slice(-2) === '--') { | ||
// close the comment | ||
state = STATE_PLAINTEXT; | ||
} | ||
tag_buffer = ''; | ||
break; | ||
default: | ||
tag_buffer = tag_buffer + char; | ||
break; | ||
} | ||
} | ||
} | ||
return output; | ||
} | ||
module.exports = striptags; |
@@ -12,3 +12,3 @@ 'use strict'; | ||
const getId = ({ attribs, parent }) => { | ||
const getId = ({ attribs = {}, parent }) => { | ||
return attribs.id || (!parent ? '' : getId(parent)); | ||
@@ -15,0 +15,0 @@ }; |
{ | ||
"name": "hexo-util", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Utilities for Hexo.", | ||
@@ -9,3 +9,3 @@ "main": "lib/index", | ||
"test": "mocha", | ||
"test-cov": "nyc npm run test", | ||
"test-cov": "nyc --reporter=lcovonly npm run test", | ||
"build:highlight": "node scripts/build_highlight_alias.js", | ||
@@ -40,3 +40,3 @@ "prepare": "npm run build:highlight" | ||
"eslint-config-hexo": "^4.0.0", | ||
"html-entities": "^1.2.1", | ||
"html-entities": "^2.1.1", | ||
"html-tag-validator": "^1.5.0", | ||
@@ -52,11 +52,10 @@ "mocha": "^8.0.1", | ||
"deepmerge": "^4.2.2", | ||
"highlight.js": "^10.0.0", | ||
"htmlparser2": "^4.0.0", | ||
"highlight.js": "^10.7.1", | ||
"htmlparser2": "^6.0.0", | ||
"prismjs": "^1.17.1", | ||
"strip-indent": "^3.0.0", | ||
"striptags": "^3.1.1" | ||
"strip-indent": "^3.0.0" | ||
}, | ||
"engines": { | ||
"node": ">=10.13.0" | ||
"node": ">=12.4.0" | ||
} | ||
} |
# hexo-util | ||
[![Build Status](https://travis-ci.com/hexojs/hexo-util.svg?branch=master)](https://travis-ci.com/hexojs/hexo-util) | ||
[![Build Status](https://github.com/hexojs/hexo-util/workflows/Tester/badge.svg?branch=master)](https://github.com/hexojs/hexo-util/actions?query=workflow%3ATester) | ||
[![NPM version](https://badge.fury.io/js/hexo-util.svg)](https://www.npmjs.com/package/hexo-util) | ||
@@ -5,0 +5,0 @@ [![Coverage Status](https://coveralls.io/repos/hexojs/hexo-util/badge.svg?branch=master&service=github)](https://coveralls.io/github/hexojs/hexo-util?branch=master) |
82393
8
1427
+ Addedhtmlparser2@6.1.0(transitive)
- Removedstriptags@^3.1.1
- Removeddomhandler@3.3.0(transitive)
- Removedhtmlparser2@4.1.0(transitive)
- Removedstriptags@3.2.0(transitive)
Updatedhighlight.js@^10.7.1
Updatedhtmlparser2@^6.0.0