Skip to content

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

Limit Markdown ordered list markers

Emre Sokullu88f796c0f6a3
diff --git a/src/chrome/src/ui/markdown-render.js b/src/chrome/src/ui/markdown-render.js
index ed6270555..2682f2b83 100644
--- a/src/chrome/src/ui/markdown-render.js
+++ b/src/chrome/src/ui/markdown-render.js
@@ -112,7 +112,7 @@ function indentationColumns(value) {
function listPrefixAt(value, startColumn = 0) {
const source = String(value);
- const marker = source.match(/^[ \t]*(?:[-+*]|\d+[.)])/);
+ const marker = source.match(/^[ \t]*(?:[-+*]|\d{1,9}[.)])/);
const leadingIndentation = marker?.[0].match(/^[ \t]*/)?.[0] || '';
const next = source[marker?.[0].length];
if (!marker
diff --git a/src/firefox/src/ui/markdown-render.js b/src/firefox/src/ui/markdown-render.js
index ed6270555..2682f2b83 100644
--- a/src/firefox/src/ui/markdown-render.js
+++ b/src/firefox/src/ui/markdown-render.js
@@ -112,7 +112,7 @@ function indentationColumns(value) {
function listPrefixAt(value, startColumn = 0) {
const source = String(value);
- const marker = source.match(/^[ \t]*(?:[-+*]|\d+[.)])/);
+ const marker = source.match(/^[ \t]*(?:[-+*]|\d{1,9}[.)])/);
const leadingIndentation = marker?.[0].match(/^[ \t]*/)?.[0] || '';
const next = source[marker?.[0].length];
if (!marker