Comparing version 5.2.0 to 5.2.1
@@ -7,5 +7,7 @@ "use strict"; | ||
var defaultMacro = function defaultMacro(content, lang) { | ||
// Default language is "text" | ||
// Escape CodeBlocks | ||
var escaped = content.replace(new RegExp('\\\\end\\s*{CodeBlock}', 'g'), ''); // Default language is "text" | ||
if (!lang) lang = 'text'; | ||
return "\\begin{CodeBlock}{".concat(lang, "}\n").concat(content, "\n\\end{CodeBlock}\n\n"); | ||
return "\\begin{CodeBlock}{".concat(lang, "}\n").concat(escaped, "\n\\end{CodeBlock}\n\n"); | ||
}; | ||
@@ -12,0 +14,0 @@ /* Stringify a code `node`. */ |
{ | ||
"name": "rebber", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"description": "Stringifies MDAST to LaTeX", | ||
@@ -38,3 +38,3 @@ "repository": "https://github.com/zestedesavoir/zmarkdown/tree/master/packages/rebber", | ||
}, | ||
"gitHead": "7dfdfdf98ac64c3867791036ab0cf1ce45918e40" | ||
"gitHead": "cffaf7f58aaf45223b922f33b1934b96e54bb3ff" | ||
} |
@@ -5,6 +5,9 @@ /* Expose. */ | ||
const defaultMacro = (content, lang) => { | ||
// Escape CodeBlocks | ||
const escaped = content.replace(new RegExp('\\\\end\\s*{CodeBlock}', 'g'), '') | ||
// Default language is "text" | ||
if (!lang) lang = 'text' | ||
return `\\begin{CodeBlock}{${lang}}\n${content}\n\\end{CodeBlock}\n\n` | ||
return `\\begin{CodeBlock}{${lang}}\n${escaped}\n\\end{CodeBlock}\n\n` | ||
} | ||
@@ -11,0 +14,0 @@ |
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
44096
1033