starlight-cannoli-plugins 1.2.0 → 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
|
@@ -167,7 +167,6 @@ div > div[class="page"] > svg {
|
|
|
167
167
|
|
|
168
168
|
// invert img.note-svg when on dark mode
|
|
169
169
|
img.note-svg {
|
|
170
|
-
color-scheme: light dark;
|
|
171
170
|
padding-top: 1em;
|
|
172
171
|
padding-bottom: 1em;
|
|
173
172
|
|
|
@@ -181,5 +180,9 @@ img.note-svg {
|
|
|
181
180
|
}
|
|
182
181
|
|
|
183
182
|
.tex-compiled {
|
|
184
|
-
background-color:
|
|
183
|
+
background-color: transparent;
|
|
184
|
+
|
|
185
|
+
html[data-theme="dark"] & {
|
|
186
|
+
filter: invert(1) hue-rotate(180deg);
|
|
187
|
+
}
|
|
185
188
|
}
|
package/package.json
CHANGED