openzca 0.1.39 → 0.1.41
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/dist/cli.js +5 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -612,19 +612,19 @@ function parseTextStyles(input) {
|
|
|
612
612
|
const lines = escapedInput.split("\n");
|
|
613
613
|
const lineStyles = [];
|
|
614
614
|
const processedLines = [];
|
|
615
|
-
const
|
|
615
|
+
const codeOutputLineIndices = /* @__PURE__ */ new Set();
|
|
616
616
|
let inCodeBlock = false;
|
|
617
617
|
for (let lineIndex = 0; lineIndex < lines.length; lineIndex += 1) {
|
|
618
618
|
let line = lines[lineIndex];
|
|
619
619
|
let baseIndent = 0;
|
|
620
620
|
if (/^```/.test(line)) {
|
|
621
|
-
codeBlockLineIndices.add(lineIndex);
|
|
622
|
-
processedLines.push(line);
|
|
623
621
|
inCodeBlock = !inCodeBlock;
|
|
624
622
|
continue;
|
|
625
623
|
}
|
|
626
624
|
if (inCodeBlock) {
|
|
627
|
-
|
|
625
|
+
const outputLineIndex = processedLines.length;
|
|
626
|
+
codeOutputLineIndices.add(outputLineIndex);
|
|
627
|
+
lineStyles.push({ lineIndex: outputLineIndex, style: TextStyle.Indent, indentSize: 1 });
|
|
628
628
|
processedLines.push(normalizeCodeBlockLeadingWhitespace(line));
|
|
629
629
|
continue;
|
|
630
630
|
}
|
|
@@ -685,7 +685,7 @@ function parseTextStyles(input) {
|
|
|
685
685
|
}
|
|
686
686
|
processedLines.push(line);
|
|
687
687
|
}
|
|
688
|
-
for (const codeLineIndex of
|
|
688
|
+
for (const codeLineIndex of codeOutputLineIndices) {
|
|
689
689
|
if (codeLineIndex >= processedLines.length) {
|
|
690
690
|
continue;
|
|
691
691
|
}
|