Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asciidoctor-prism-extension

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asciidoctor-prism-extension - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

11

index.js

@@ -40,3 +40,3 @@ 'use strict';

module.exports = {
initialize (name, backend, {$$smap: {document}}) {
initialize (name, backend, {document}) {
const languages = getDocumentLanguages(document);

@@ -57,3 +57,3 @@

if (typeof lang === 'string' && Prism.languages[lang] === undefined) {
if (lang && Prism.languages[lang] === undefined) {
const {languages} = this;

@@ -68,4 +68,7 @@ const source = node.lines.join('\n');

highlight (node, content, lang) {
return typeof lang === 'string' ? Prism.highlight(content, Prism.languages[lang])
.replace(/____(\d+)____/gi, '<b class="conum">($1)</b>') : content;
return lang
? Prism.highlight(
content, Prism.languages[lang]
).replace(/____(\d+)____/gi, '<b class="conum">($1)</b>')
: content;
},

@@ -72,0 +75,0 @@

{
"name": "asciidoctor-prism-extension",
"version": "2.0.4",
"version": "2.0.5",
"description": "Highlight Asciidoc code listings with Prism.js, server side, with no front-end dependencies.",

@@ -37,7 +37,7 @@ "main": "index.js",

"devDependencies": {
"@asciidoctor/core": "^2.0.0-rc.3"
"@asciidoctor/core": "^2.0.0"
},
"peerDependencies": {
"@asciidoctor/core": "^2.0.0-rc.3"
"@asciidoctor/core": "^2.0.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc