reallysimpledocs 1.0.9 → 1.0.10

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reallysimpledocs",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "A simple documentation system for Astro, built with Basecoat and Tailwind CSS.",
5
5
  "author": {
6
6
  "name": "hunvreus",
@@ -86,12 +86,17 @@ function transformCodeBlocks(parent) {
86
86
  for (const child of parent.children) {
87
87
  if (isElement(child, "pre") && child.children?.some((node) => isElement(node, "code"))) {
88
88
  addClass(child, ["scrollbar"]);
89
+ if (isShikiBlock(child)) addClass(child, ["shiki"]);
89
90
  continue;
90
91
  }
91
92
  transformCodeBlocks(child);
92
93
  }
93
94
  }
94
95
 
96
+ function isShikiBlock(node) {
97
+ return String(node?.properties?.style || "").includes("--shiki-");
98
+ }
99
+
95
100
  function nodeText(node) {
96
101
  if (node?.type === "text") return node.value || "";
97
102
  if (!Array.isArray(node?.children)) return "";