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
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  remarkLatexCompile,
9
9
  starlightLatexCompile
10
- } from "./chunk-T4UKGKU6.js";
10
+ } from "./chunk-CLBOVNPT.js";
11
11
 
12
12
  // src/plugins/astro-normalize-paths.ts
13
13
  import { readFileSync, writeFileSync, existsSync } from "fs";
@@ -2,7 +2,7 @@ import {
2
2
  compileLatexToSvg,
3
3
  remarkLatexCompile,
4
4
  starlightLatexCompile
5
- } from "../chunk-T4UKGKU6.js";
5
+ } from "../chunk-CLBOVNPT.js";
6
6
  export {
7
7
  compileLatexToSvg,
8
8
  remarkLatexCompile as default,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  starlightLatexCompile,
3
3
  starlight_plugin_default
4
- } from "../chunk-T4UKGKU6.js";
4
+ } from "../chunk-CLBOVNPT.js";
5
5
  export {
6
6
  starlight_plugin_default as default,
7
7
  starlightLatexCompile
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "starlight-cannoli-plugins",
3
3
  "type": "module",
4
- "version": "1.2.1",
4
+ "version": "1.2.2",
5
5
  "description": "Starlight plugins for automatic sidebar generation and link validation",
6
6
  "license": "ISC",
7
7
  "main": "./dist/index.js",