@zhennann/markdown-it-block
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -32,3 +32,3 @@ // Process block-level custom containers | ||
// render | ||
if (!block || !block.render) { | ||
if (!block || !block.beanFullName) { | ||
// placeholder | ||
@@ -42,4 +42,6 @@ const res = JSON5.stringify(content, null, 2); | ||
} | ||
// block | ||
return block.render({ md, options, block, token, index: idx, content }); | ||
// bean | ||
const beanInstance = options.ctx.bean._getBean(block.beanFullName); | ||
if (!beanInstance) throw new Error(`bean not found: ${block.beanFullName}`); | ||
return beanInstance.render({ md, options, block, token, index: idx, content }); | ||
} | ||
@@ -46,0 +48,0 @@ |
{ | ||
"name": "@zhennann/markdown-it-block", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "Plugin to create block-level custom tags for markdown-it markdown parser on Cabloy-CMS", | ||
@@ -27,3 +27,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "aab413c1edd9cc0630a0fdcb340c3e5a585f4920" | ||
"gitHead": "2d69c0a38865606ad899b3f49d27fe058ba4c5a7" | ||
} |
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
5889
117