[PR #1228] [CLOSED] serve: list items separated by blank lines are one list, and a list continued later keeps its numbers (#671) #3325

Closed
opened 2026-11-07 14:40:39 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1228
Author: @BGonnermann
Created: 10/6/2026
Status: ❌ Closed

Base: main ← Head: web/loose-lists-671


📝 Commits (2)

  • dfcca73 serve: list items separated by blank lines are one list, and a list continued later keeps its numbers (#671)
  • 5772da5 web: scan loose-list blank runs once

📊 Changes

2 files changed (+104 additions, -3 deletions)

View changed files

➕ serve/test_web_markdown.py (+91 -0)
📝 serve/web/app.js (+13 -3)

📄 Description

Fixes #671.

Blank lines between list items currently split an ordered list into several <ol> blocks, each numbered 1.. Keep items of the same kind in one list across blank lines. A list resumed after a code block or paragraph starts at its written number, including 0.

Skip each run of blank lines once. The original implementation rescanned the remaining run for every blank line and could stall chat rendering. The new regression test times out on that implementation and passes after the repair.

Validation on Windows 11, Python 3.14.7, and Node 24.19.0:

  • python -m unittest serve.test_web_markdown -v: four tests pass. The two original list regressions fail on unmodified upstream d5ea713.
  • python -m unittest discover -s serve -p 'test_*.py' -v: 456 tests, OK, six skipped in the normal Windows user environment.
  • Actual Chat UI with the HTTP/SSE mock engine, Playwright 1.63.0, and Chromium 149.0.7827.55: loose ordered and bullet lists, steps separated by code fences, and starts at 0 and 7 render correctly. Desktop 1280x1400 and mobile 390x1400 screenshots inspected. No browser page errors.
  • A run of 100,000 blank lines between two list items renders in 2.6 ms in Chromium. The Python/Node test gives that case a five-second deadline.

Indented paragraphs remain separate paragraphs between lists, as described in the original PR. No new Markdown syntax is added.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1228 **Author:** [@BGonnermann](https://github.com/BGonnermann) **Created:** 10/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `web/loose-lists-671` --- ### 📝 Commits (2) - [`dfcca73`](https://github.com/Niko1221/Strata/commit/dfcca73adcc5764295ccd9be5e61f683ca488da6) serve: list items separated by blank lines are one list, and a list continued later keeps its numbers (#671) - [`5772da5`](https://github.com/Niko1221/Strata/commit/5772da50b9aaa3ae262ce773e3114583877a8478) web: scan loose-list blank runs once ### 📊 Changes **2 files changed** (+104 additions, -3 deletions) <details> <summary>View changed files</summary> ➕ `serve/test_web_markdown.py` (+91 -0) 📝 `serve/web/app.js` (+13 -3) </details> ### 📄 Description Fixes #671. Blank lines between list items currently split an ordered list into several `<ol>` blocks, each numbered `1.`. Keep items of the same kind in one list across blank lines. A list resumed after a code block or paragraph starts at its written number, including `0`. Skip each run of blank lines once. The original implementation rescanned the remaining run for every blank line and could stall chat rendering. The new regression test times out on that implementation and passes after the repair. Validation on Windows 11, Python 3.14.7, and Node 24.19.0: - `python -m unittest serve.test_web_markdown -v`: four tests pass. The two original list regressions fail on unmodified upstream `d5ea713`. - `python -m unittest discover -s serve -p 'test_*.py' -v`: 456 tests, OK, six skipped in the normal Windows user environment. - Actual Chat UI with the HTTP/SSE mock engine, Playwright 1.63.0, and Chromium 149.0.7827.55: loose ordered and bullet lists, steps separated by code fences, and starts at `0` and `7` render correctly. Desktop 1280x1400 and mobile 390x1400 screenshots inspected. No browser page errors. - A run of 100,000 blank lines between two list items renders in 2.6 ms in Chromium. The Python/Node test gives that case a five-second deadline. Indented paragraphs remain separate paragraphs between lists, as described in the original PR. No new Markdown syntax is added. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:40:39 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3325
No description provided.