Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

Preserve tabbed Markdown list padding

Emre Sokullu5c7fe013d89a
diff --git a/src/chrome/src/ui/markdown-render.js b/src/chrome/src/ui/markdown-render.js
index 783a006c3..cdb7ea6b9 100644
--- a/src/chrome/src/ui/markdown-render.js
+++ b/src/chrome/src/ui/markdown-render.js
@@ -127,6 +127,9 @@ function listPrefixAt(value, startColumn = 0) {
column += width;
offset += 1;
}
+ if (paddingColumns > 4 && source[marker[0].length] === '\t') {
+ return `${source.slice(0, marker[0].length)} `;
+ }
return source.slice(0, marker[0].length + (paddingColumns <= 4 ? offset - marker[0].length : 1));
}
diff --git a/src/firefox/src/ui/markdown-render.js b/src/firefox/src/ui/markdown-render.js
index 783a006c3..cdb7ea6b9 100644
--- a/src/firefox/src/ui/markdown-render.js
+++ b/src/firefox/src/ui/markdown-render.js
@@ -127,6 +127,9 @@ function listPrefixAt(value, startColumn = 0) {
column += width;
offset += 1;
}
+ if (paddingColumns > 4 && source[marker[0].length] === '\t') {
+ return `${source.slice(0, marker[0].length)} `;
+ }
return source.slice(0, marker[0].length + (paddingColumns <= 4 ? offset - marker[0].length : 1));
}