starlight-cannoli-plugins 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -170,6 +170,9 @@ function hashLatexCode(code) {
|
|
|
170
170
|
return createHash("md5").update(normalized).digest("hex").slice(0, 16);
|
|
171
171
|
}
|
|
172
172
|
function buildLatexSource(latexCode) {
|
|
173
|
+
if (latexCode.includes("\\documentclass") && latexCode.includes("\\begin{document}")) {
|
|
174
|
+
return latexCode.trim();
|
|
175
|
+
}
|
|
173
176
|
const separatorRegex = /%[ \t]*---/;
|
|
174
177
|
const parts = latexCode.split(separatorRegex);
|
|
175
178
|
let preamble = "";
|
package/dist/index.js
CHANGED
package/package.json
CHANGED