Skip to content

Commit

Permalink
Update Highlight.js to ~10.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Oct 19, 2020
1 parent 67781ba commit f179695
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function highlight(name, value, options) {

result = high.highlight(name, value, true)

high.configure(before)
high.configure(before || {})

/* istanbul ignore if - Highlight.js seems to use this (currently) for broken
* grammars, so let’s keep it in there just to be sure. */
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
],
"dependencies": {
"fault": "^1.0.0",
"highlight.js": "~10.2.0"
"highlight.js": "~10.3.0"
},
"devDependencies": {
"browserify": "^17.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/fixture/js-class/output.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Car</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">Vehicle</span> </span>{
<span class="hljs-keyword">constructor</span>(speed, cost) {
<span class="hljs-function"><span class="hljs-title">constructor</span>(<span class="hljs-params">speed, cost</span>)</span> {
<span class="hljs-built_in">super</span>(speed);

<span class="hljs-keyword">var</span> c = <span class="hljs-built_in">Symbol</span>(<span class="hljs-string">'cost'</span>);
Expand Down
2 changes: 1 addition & 1 deletion test/fixture/js-keywords/output.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">$initHighlight</span>(<span class="hljs-params">block, cls</span>) </span>{
<span class="hljs-keyword">try</span> {
<span class="hljs-keyword">if</span> (cls.search(<span class="hljs-regexp">/\bno\-highlight\b/</span>) != <span class="hljs-number">-1</span>)
<span class="hljs-keyword">if</span> (cls.search(<span class="hljs-regexp">/\bno\-highlight\b/</span>) != -<span class="hljs-number">1</span>)
<span class="hljs-keyword">return</span> process(block, <span class="hljs-literal">true</span>, <span class="hljs-number">0x0F</span>) +
<span class="hljs-string">' class=""'</span>;
} <span class="hljs-keyword">catch</span> (e) {
Expand Down
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@ test('lowlight.highlightAuto(value[, options])', function (t) {

t.equal(
result.secondBest.language,
'abnf',
'typescript',
'should return a `secondBest` `language`'
)

t.equal(
result.secondBest.relevance,
2,
10,
'should return a `secondBest` `relevance`'
)

Expand Down

0 comments on commit f179695

Please sign in to comment.