@blockrun/runcode 2.2.1 → 2.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.
- package/dist/tools/bash.js +1 -1
- package/dist/tools/edit.js +1 -1
- package/dist/ui/terminal.js +10 -1
- package/package.json +1 -1
package/dist/tools/bash.js
CHANGED
package/dist/tools/edit.js
CHANGED
|
@@ -26,7 +26,7 @@ async function execute(input, ctx) {
|
|
|
26
26
|
if (!content.includes(oldStr)) {
|
|
27
27
|
// Find lines containing fragments of old_string for helpful context
|
|
28
28
|
const lines = content.split('\n');
|
|
29
|
-
const searchTerms = oldStr.split('\n').map(l => l.trim()).filter(l => l.length >
|
|
29
|
+
const searchTerms = oldStr.split('\n').map(l => l.trim()).filter(l => l.length > 3);
|
|
30
30
|
const matchedLines = [];
|
|
31
31
|
if (searchTerms.length > 0) {
|
|
32
32
|
for (let i = 0; i < lines.length && matchedLines.length < 5; i++) {
|
package/dist/ui/terminal.js
CHANGED
|
@@ -95,7 +95,14 @@ class MarkdownRenderer {
|
|
|
95
95
|
if (line.match(/^(\s*)[-*] /)) {
|
|
96
96
|
return line.replace(/^(\s*)[-*] /, '$1• ');
|
|
97
97
|
}
|
|
98
|
-
// Numbered lists
|
|
98
|
+
// Numbered lists
|
|
99
|
+
if (/^\s*\d+\.\s/.test(line)) {
|
|
100
|
+
return this.renderInline(line);
|
|
101
|
+
}
|
|
102
|
+
// Blockquotes
|
|
103
|
+
if (line.startsWith('> ')) {
|
|
104
|
+
return chalk.dim('│ ') + chalk.italic(this.renderInline(line.slice(2)));
|
|
105
|
+
}
|
|
99
106
|
// Tables — leave as-is (chalk doesn't help much)
|
|
100
107
|
// Inline formatting
|
|
101
108
|
return this.renderInline(line);
|
|
@@ -109,6 +116,8 @@ class MarkdownRenderer {
|
|
|
109
116
|
.replace(/\*\*([^*]+)\*\*/g, (_, t) => chalk.bold(t))
|
|
110
117
|
// Italic (only single * not preceded/followed by *)
|
|
111
118
|
.replace(/(?<!\*)\*([^*]+)\*(?!\*)/g, (_, t) => chalk.italic(t))
|
|
119
|
+
// Strikethrough
|
|
120
|
+
.replace(/~~([^~]+)~~/g, (_, t) => chalk.strikethrough(t))
|
|
112
121
|
// Links
|
|
113
122
|
.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (_, label, url) => chalk.blue.underline(label) + chalk.dim(` (${url})`))
|
|
114
123
|
// Restore code markers
|