Open-source AI browser agent for Chrome and Firefox (monorepo) ðŸ§
JavaScript ai-agentai-agentsai-toolsbrowser-aibrowser-automationbrowser-extensionchrome-aichrome-devtoolschrome-extensionchrome-extensionsfirefox-addonfirefox-addonsfirefox-extensionfirefox-extensionsgemmagemma4minimaxoffline-aioffline-llmqwen
Handle whitespace-only Markdown list items
Emre Sokullu714d8bd31bef
diff --git a/src/chrome/src/ui/markdown-render.js b/src/chrome/src/ui/markdown-render.jsindex 2682f2b83..783a006c3 100644--- a/src/chrome/src/ui/markdown-render.js+++ b/src/chrome/src/ui/markdown-render.js@@ -327,9 +327,15 @@ function listContinuationContainer(source, position, prefix, indentation, noListif (missingQuotes < 0 || (missingQuotes && !current.leadingQuoteIndent)) return noList();if (precedingContainer.listPrefix) {- const container = missingQuotes+ let container = missingQuotes? fenceContainer(`${precedingContainer.containerPrefix}${'> '.repeat(missingQuotes)}`): precedingContainer;+ const emptyListMarker = line.match(/^[ \t]*(?:[-+*]|\d{1,9}[.)])[ \t]*$/);+ if (emptyListMarker) {+ const marker = emptyListMarker[0].replace(/[ \t]+$/, '');+ container = { ...container, listIndentGroups: [...container.listIndentGroups] };+ container.listIndentGroups[container.listIndentGroups.length - 1] = indentationColumns(marker) + 1;+ }const listIndent = container.listIndentGroups.at(-1);if (listIndent && continuationIndent >= listIndent && continuationIndent <= listIndent + 3) {return container;diff --git a/src/firefox/src/ui/markdown-render.js b/src/firefox/src/ui/markdown-render.jsindex 2682f2b83..783a006c3 100644--- a/src/firefox/src/ui/markdown-render.js+++ b/src/firefox/src/ui/markdown-render.js@@ -327,9 +327,15 @@ function listContinuationContainer(source, position, prefix, indentation, noListif (missingQuotes < 0 || (missingQuotes && !current.leadingQuoteIndent)) return noList();if (precedingContainer.listPrefix) {- const container = missingQuotes+ let container = missingQuotes? fenceContainer(`${precedingContainer.containerPrefix}${'> '.repeat(missingQuotes)}`): precedingContainer;+ const emptyListMarker = line.match(/^[ \t]*(?:[-+*]|\d{1,9}[.)])[ \t]*$/);+ if (emptyListMarker) {+ const marker = emptyListMarker[0].replace(/[ \t]+$/, '');+ container = { ...container, listIndentGroups: [...container.listIndentGroups] };+ container.listIndentGroups[container.listIndentGroups.length - 1] = indentationColumns(marker) + 1;+ }const listIndent = container.listIndentGroups.at(-1);if (listIndent && continuationIndent >= listIndent && continuationIndent <= listIndent + 3) {return container;