asciidoctor-prism-extension
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -57,3 +57,4 @@ 'use strict'; | ||
const {languages} = this; | ||
throw TypeError(`Prism language ${lang} is not loaded (loaded: ${languages}).`); | ||
const source = node.lines.join('\n'); | ||
throw TypeError(`Prism language ${lang} is not loaded (loaded: ${languages}).\n${source}`); | ||
} | ||
@@ -60,0 +61,0 @@ |
{ | ||
"name": "asciidoctor-prism-extension", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Highlight Asciidoc code listings with Prism.js, server side, with no front-end dependencies.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
16
test.js
@@ -10,3 +10,3 @@ 'use strict'; | ||
const doc = `= Document | ||
var doc = `= Document | ||
:source-highlighter: prism | ||
@@ -62,1 +62,15 @@ :prism-languages: bash | ||
assert.ok(!output.match('<style type="text/css" class="prism-theme">')); | ||
// Listing without language | ||
var doc = `= Document | ||
:source-highlighter: prism | ||
:prism-languages: bash | ||
---- | ||
$ MYSQL_URL=mysql://user:password@server/database \ | ||
node sql-connect.js | ||
---- | ||
`; | ||
var output = asciidoctor.convert(doc, options); | ||
assert.ok(output); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43969
131