specra 0.2.65 → 0.2.66

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.
Files changed (2) hide show
  1. package/dist/mdx.js +9 -5
  2. package/package.json +1 -1
package/dist/mdx.js CHANGED
@@ -1078,11 +1078,15 @@ function dedentComponentChildren(markdown) {
1078
1078
  minIndent = indent;
1079
1079
  }
1080
1080
  if (minIndent > 0 && minIndent !== Infinity) {
1081
- // Dedent non-code-fence lines by the common indent.
1082
- // Code fence lines are left as-is to preserve their content.
1083
- const dedented = lines.map((line, i) => {
1084
- if (codeFenceLines.has(i))
1085
- return line;
1081
+ // Dedent every non-empty line by the common indent, including code-fence
1082
+ // lines and their content. Code lines are excluded from the min-indent
1083
+ // *calculation* above (so a column-0 code line doesn't pin minIndent to 0),
1084
+ // but they must still be dedented here: leaving an indented fence at its
1085
+ // original column (e.g. 4 spaces) turns it into a CommonMark *indented*
1086
+ // code block (fences allow <=3 spaces of indent), which renders the raw
1087
+ // ```lang fence literally. The Math.min cap strips only the shared wrapper
1088
+ // indent, never a line's meaningful internal indentation.
1089
+ const dedented = lines.map((line) => {
1086
1090
  if (line.trim().length === 0)
1087
1091
  return line;
1088
1092
  return line.slice(Math.min(minIndent, line.match(/^(\s*)/)?.[1].length ?? 0));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specra",
3
- "version": "0.2.65",
3
+ "version": "0.2.66",
4
4
  "description": "A modern documentation library for SvelteKit with built-in versioning, API reference generation, full-text search, and MDX support",
5
5
  "svelte": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",