Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriangalliat committed Dec 26, 2021
1 parent 580e8ba commit 0f6cacf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"test": "npm run lint && node test"
},
"dependencies": {
"highlight.js": "^11.3.x",
"highlight.js": "^11.3.1",
"lodash.flow": "^3.5.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ equal(

equal(
md().use(highlightjs).render('```js\nconsole.log(42)\n```'),
`<pre><code class="hljs language-js"><span class="hljs-built_in">console</span>.log(<span class="hljs-number">42</span>)
`<pre><code class="hljs language-js"><span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-number">42</span>)
</code></pre>
`)

Expand Down Expand Up @@ -64,12 +64,12 @@ equal(
// Inline works with pandoc format e.g. `code`{.lang}
equal(
md().use(highlightjs, { inline: true }).renderInline('`console.log(42)`{.js}'),
'<code class="language-js"><span class="hljs-built_in">console</span>.log(<span class="hljs-number">42</span>)</code>')
'<code class="language-js"><span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-number">42</span>)</code>')

// Inline works with kramdown format e.g. `code`{:.lang}
equal(
md().use(highlightjs, { inline: true }).renderInline('`console.log(42)`{:.js}'),
'<code class="language-js"><span class="hljs-built_in">console</span>.log(<span class="hljs-number">42</span>)</code>')
'<code class="language-js"><span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-number">42</span>)</code>')

// Escape language class
equal(
Expand Down

0 comments on commit 0f6cacf

Please sign in to comment.