Skip to content

Wait for the scroll a press states before reading its stillness - #13

Merged
max-sixty merged 3 commits into
mainfrom
fix/ci-32321052048
Aug 24, 2026
Merged

max-sixty merged 3 commits into
mainfrom
fix/ci-32321052048

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Problem

Run 32321052048 went red on main with two failures. This PR is the first: test_a_page_nobody_has_touched_scrolls_from_the_keyboard failed with PageDown moved nothing on a page nobody had clicked in (assert 0 > 0). The press was never what failed — the wait was. The test read the scroll's resting place through SCROLL_STILL, which infers "stopped" from a stretch with no change, and that is the inference tests/CLAUDE.md names in "A wait consumes a fact the system states": a page that has not started moving is as still as one that finished. wait_for_function runs its predicate once at injection and once per frame, so a runner that puts more than the 50ms hold plus a frame between the press and the browser's first scrolled frame gets "still" back while the page is still at the top the test reset it to a moment earlier — and the assertion reads that zero as a dead key. The second failure (test_a_stale_cancel_cannot_settle_a_newer_durable_generation) is already fixed by #6; I've linked this run there rather than duplicating it.

Solution

The movement is waited for rather than inferred. SCROLLED is the fact a press that scrolls the page states, and the stillness after it now only measures where a scroll already in flight came to rest — which is what leaves the next key's reset landing on a glide that is over rather than one still on its way. The sibling test below already took that edge first and now names it the same way, so the constant's contract ("only ever asked after the movement itself has been observed") is true at both call sites.

Testing

Reproduction and bug-back

Reproduced by holding the browser's scroll back a fixed lateness while frames keep ticking — keydown prevented, the scroll queued on a setTimeout — which emulates the loaded runner without also stretching the poller's own schedule (CPU throttling slows both, so it hides the race rather than showing it):

old late=20ms  Space/PageDown/ArrowDown: read scrollTop=740
old late=120ms Space/PageDown/ArrowDown: read scrollTop=0     <- the CI failure verbatim
old late=400ms Space/PageDown/ArrowDown: read scrollTop=0
new late=20ms  Space/PageDown/ArrowDown: read scrollTop=740
new late=120ms Space/PageDown/ArrowDown: read scrollTop=740
new late=400ms Space/PageDown/ArrowDown: read scrollTop=740

Bug-back, so the test still catches what it names: commenting out document.body.focus({ preventScroll: true }) in leaf.js — the line the test exists for — fails it, with the key named.

FAILED tests/test_render.py::test_a_page_nobody_has_touched_scrolls_from_the_keyboard
Failed: Space moved nothing on a page nobody had clicked in

With the runtime restored, the test passes, as do the 19 tests matching scroll or keyboard or esc_hands or focus, and pre-commit run --files tests/test_render.py is clean.


Automated fix for failed run

`test_a_page_nobody_has_touched_scrolls_from_the_keyboard` went red on main with
`PageDown moved nothing on a page nobody had clicked in`, and the press was
never the thing that failed. The test read the scroll's resting place through
`SCROLL_STILL`, which infers "stopped" from a stretch with no change — the exact
inference `tests/CLAUDE.md` names in "A wait consumes a fact the system states":
a page that has not started moving is as still as one that finished. The
predicate runs once at injection and once per frame, so a runner that puts more
than the 50ms hold plus a frame between the press and the browser's first
scrolled frame gets "still" back while the page is still sitting at the top the
test just reset it to, and the assertion reads that zero as the press being
dead.

So the movement is waited for rather than inferred: `SCROLLED` is the fact the
press states, and the stillness that follows now only measures where a scroll
already in flight came to rest — which is what leaves the next key's reset
landing on a glide that is over. The sibling test below already took that edge
first and now names it the same way.

Reproduced by holding the browser's scroll back a fixed lateness while frames
keep ticking (`keydown` prevented, the scroll queued on a timeout): at 120ms the
old wait returns at `scrollTop=0` for all three keys, which is the CI failure
verbatim, and the new one reads 740 at 120ms and at 400ms. Commenting out
`document.body.focus({ preventScroll: true })` in the runtime — the line the
test exists for — still fails it, naming the key.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change itself reads correctly: SCROLLED re-establishes what the deleted assert page.evaluate(top) > 0 proved, and it proves it after waiting rather than a frame into the glide, so the loop's next scrollTop = 0 lands on a scroll that is over. top is dead in that test once the assert goes, and the other test keeps its own. Not approving because this is a self-authored PR, not because of anything below.

The same shape is still in the file, on the other copy of this predicate. SCROLL_STILL has a twin — SCROLL_SETTLED, declared just above test_the_banner_counts_what_the_page_is_still_asking — that is the same predicate byte for byte apart from its identifier names (now/window.__lfScroll where this one says at/window.__lfScrollAt), down to sharing window.__lfScrollSince. Both of its callers, test_the_ring_is_one_box_around_the_whole_change and test_the_walk_travels_to_an_ask_a_page_left_boxless, take stillness with no observed edge in front of it — exactly what the comment this PR extends now says the norm forbids, and what tests/CLAUDE.md states outright under "A wait consumes a fact the system states".

The failure it leaves open is the one this PR closes here, worn as a product bug rather than a flake: page.keyboard.press("n"), then page.wait_for_function(SCROLL_SETTLED, arg=SCROLL_SETTLE_MS), and if the glide has not begun within SCROLL_SETTLE_MS of the wait's injection, the predicate goes true at the position the reader was already standing at and the next line — assert page.evaluate("() => document.body.scrollTop") > was — fails as the walk went up rather than down, which is where the document's origin is. That message names a travel bug for what was a loaded machine. Those two are less acute than the loop fixed here, since an expect(...) and a page.evaluate sit between the press and the wait, but the gap is the same one, and tests/CLAUDE.md already records this pair flaking under the suite's parallel run.

SCROLLED as written does not cover them: both read was before the press and travel downward from a non-zero offset, so their edge is scrollTop !== was, not scrollTop > 0. Folding the twin into one constant and giving it an edge-first caller looks like the complete form of what this PR started — but it rewrites two tests this branch does not otherwise touch, and both constants predate it, so I read it as its own change rather than scope for this one. Say the word and I will open it.

Where each name is

Grep anchors, since line numbers drift between the merged tree and a local branch:

  • SCROLL_STILL = """(hold) => { — the constant this PR documents.
  • SCROLL_SETTLED = """(hold) => { — the twin, whose body differs only in const now / window.__lfScroll.
  • page.wait_for_function(SCROLL_SETTLED, arg=SCROLL_SETTLE_MS) — two hits, one in each of the tests named above.

SCROLL_SETTLE_MS is already shared across both, so only the predicate is duplicated.

Comment thread tests/test_render.py Resolved
A wait that runs out says nothing about why, and the press can move
nothing because the runtime threw. `assert errors == []` never runs once
`pytest.fail` fires, so the errors go with the message — as the TAB_TONE
wait already does.
@max-sixty
max-sixty merged commit 61bf2af into main Aug 24, 2026
7 checks passed
@max-sixty
max-sixty deleted the fix/ci-32321052048 branch August 24, 2026 21:49
max-sixty pushed a commit that referenced this pull request Sep 18, 2026
`notes/workspace-followups.md` has been presenting finished work as the
plan since 9 September. It opens with "Start #2, #3 and #4 as one
coordinated contract batch; run the review-queue simplification #8
alongside it" — all four of those shipped that week — and carries
thirteen briefs, each with a live "Next task" and "Done when", for work
`TODO.md` dropped as complete. This removes them and leaves the six
`TODO.md` still links: #11, #14, #19, #20, #22 and #23.

The trim follows the convention #666 set and the reason `CLAUDE.md`
gives for it: a note is never a second specification for shipped
behavior. #666 removed #6, #7, #16 and #17 the same way, rewriting the
two `Owner / dependencies` lines in surviving briefs that named them; it
simply did not reach the rest.

Each removal is evidenced by the commit that took the item out of
`TODO.md`, not by a reading of the current code:

| Brief | Removed from `TODO.md` by |
| --- | --- |
| #1, #3, #5 |
[`0f7f06a6`](0f7f06a)
— "Completed workspace items #1, #3, and #5 are removed from `TODO.md`"
|
| #2, #4, #8, #9 |
[`28b5da99`](28b5da9)
— "the completed #2, #4, #6, #8, #9, and #17 backlog entries are removed
while preserving the deferred evaluation work" |
| #13, #15 |
[`6df40353`](6df4035)
— "closes three bounded workspace follow-ups" |
| #10, #12 |
[`c9eaa2c6`](c9eaa2c)
— the continuation cue and the adaptive Threads placement |
| #18, #21 |
[`e46c8b93`](e46c8b9)
— the monitoring workspace and its package-owned root |

Alongside the briefs, three group headings are now empty and go; the
`Suggested work packages` table loses the rows whose whole scope landed;
and four cross-references that named a removed ID are rewritten — #14's
dependency on the Threads-placement experiment, #20's ordering behind
#8, and the two sentences in `Reproduction record` and `Browser
evidence` that pointed at briefs no longer here.

#14 needed more than a rewritten pointer. The experiment it waited on
was settled in two steps, and only the first removed an ID: [PR
#520](#520) kept the adaptive
placement and deferred the modal-focus work to #24, which landed in [PR
#536](#536) as inertness, dialog
semantics and focus containment for a covering workspace. That is the
surface #14 exists to verify, so its `Done when` — "Avoid imposing a
modal focus trap on a nonmodal panel" — described the containment #536
shipped as the defect to avoid. It now states the containment the
shipped modality requires, and the dependency line names both
settlements.

The dated evidence sections themselves stay. They are the record of what
was read in a browser on 8 September, not a plan, and the note's own
header scopes them to that date.

No test covers `notes/`, and this changes no behavior, so there is
nothing to regress. `pre-commit` passes on the file; the `TODO.md` →
note anchors all still resolve, and no surviving text references a
removed ID.

---------

Co-authored-by: leaf-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Sep 20, 2026
The nightly suite on [run
35527368685](https://github.com/max-sixty/leaf/actions/runs/35527368685)
failed on `test_ask_binding_badges_do_not_cover_their_key_line` — the
badge the test scrolls one pixel into the shortcut bar's band was still
worn, count 2 rather than 1, stable across all fourteen polls. The press
was fine and the placement pass was fine; the test measured a page that
had not finished moving. This replaces the wait that let it.

One gesture's travel is two moves.
[`scrollRevealedElement`](https://github.com/max-sixty/leaf/blob/ecf43c732347f05a4097916ddea991d152bde0ec/skills/leaf/assets/runtime/anchor-travel.js#L117)
places the element's nested scrollports at once and then glides the
scroller that owns it to the centring position, so between the instant
move and the glide's first step the page stands still for a rendering
frame or more. Three copies of one idle-window predicate —
`SCROLL_SETTLED`, `SCROLL_STILL`, and an inline third for the board's
scrollport — asked only whether the scroll number had held for 50ms, and
answered with the place the instant move left as soon as the machine's
frames were further apart than that window. The test then measured its
geometry there, issued its own `scrollTo` from it, and the glide landed
on top of it: the badge ends up back above the bar, legitimately kept,
for the rest of the assertion's timeout.

`scroll_settled` counts animation frames instead. The compositor
advances a glide on every frame it runs, independently of the main
thread, so a still frame can only be one the glide has not started on —
and a loaded machine takes *fewer* frames through the pause rather than
more, which is the opposite of how the millisecond window behaves.
Playwright polls `wait_for_function` on `requestAnimationFrame`, so one
evaluation is one frame.

The unit was the cause, and the call sites showed it: the same predicate
was asked with three different holds (0ms, 50ms, 400ms), one caller
deleted its globals and two seeded them before their own wait could mean
anything, and the two copies shared a `window.__lfScrollSince` between
them. The helper now owns that record, so there is nothing left for a
caller to reset, and the 400ms hold that was outlasting a conversation
refresh reads behind the card that refresh writes instead — the edge a
travel would have been asked for behind.
[#13](#13) established the other
half of this rule, that stillness is only asked after the movement
itself is observed; those call sites keep their `SCROLLED` wait
unchanged.

<details><summary>Measurement: both predicates against the glide they
must outlast</summary>

Both predicates evaluated on the same animation frames, next to the
scroll trace, for the first `a` press on the binding-badge page under
`Emulation.setCPUThrottlingRate`. `ms` is the 50ms window as
`SCROLL_SETTLED` had it; `frames` is the new count; `settled` is where
the travel actually ended.

```
rate=1   ms={frame: 7, at: 144}   frames={frame: 7, at: 144}   settled=144
rate=2   ms={frame: 1, at:  94}   frames={frame: 6, at: 144}   settled=144
rate=4   ms={frame: 2, at:  94}   frames={frame: 6, at: 144}   settled=144
rate=8   ms={frame: 2, at:  94}   frames={frame: 6, at: 144}   settled=144
rate=16  ms={frame: 2, at:  94}   frames={frame: 6, at: 144}   settled=144
```

94 is where the instant move left the page; 144 is where the glide put
it. Unthrottled the two agree, which is why this held on every desk. At
any slowdown the millisecond window answers 94 and the frame count
answers 144. Unthrottled, the instant move reports at 9ms and the
glide's first step at 43ms, so a 50ms window already spans the pause
before the runner drops a single frame.

Verified: the failing test, the other fourteen in
`test_render_widgets.py` that wait on a scroll, and the nine across
`test_render_aim.py`, `test_render_anchors.py`,
`test_render_commands.py`, `test_render_controls.py`,
`test_render_drafts.py` and `test_render_projection.py` — 30 tests, all
passing. The everyday gate passes apart from five cases this sandbox
owns (`/tmp` is read-only here, and the umask case reads the sandbox's);
each of those fails identically on f7ef2ef with the branch stashed.
`pre-commit` is clean over the changed files.

</details>

---------

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Oct 11, 2026
…2425)

Package widgets wrote their own copies of four runtime behaviors and
missed cases (workstream #13 of the duplicate-logic sweep). The helper
surface, `widget-api.js`, now carries each one, and every copy moves
onto it.

- **`rowArrows(node)`** (`keyboard/bindings.js`) returns the `[back,
ahead]` arrows in the row's text direction. lf-tabs, lf-trace, lf-board,
the reaction and response rows, margin entries and `DISCLOSE` use it. In
right-to-left text the trace timeline's arrows now step the way its rail
runs, a board card moves toward the column its arrow points at, and a
disclosure opens with ←. No binding moves between core and widget
scopes: every site already declared both arrows, and only which one
means "back" changes.
- **lf-trace threw in right-to-left text**: Vis names its background
plane `vis-vertical-rtl` there, which the cursor-plane query missed.
- **`fragmentTarget(hash)`** is exported. lf-tabs reads Back/Forward
fragments with it, so an id inside a shadow tree or a malformed escape
opens the panel the landing goes to. lf-activity links only destinations
Leaf's arrival can reach, and names a section with `elementById`, as
Threads does.
- **`plainPress(event)`** (`pointer.js`) is the primary-button,
no-modifier test that media, held-word, lf-shot and lf-call-diff each
spelled out.
- **`keeps`** is now in the initial producers' kit (`prepaint.js`,
documented in `packages.md`). The activity and playground producers use
it, as do presentation, banner, css-anchors and the `aria-keyshortcuts`
painter.

The playground's copy button stays a native button, because its initial
producer draws it before modules load. It now announces its result
through the page's live region, as `wa-copy-button` does. Per-tab memory
stays per widget: an `x-views` member, the activity view's saved reading
and a settled group's open bit are different facts in `tabStore`.

Tests: a right-to-left trace steps with ← to a later point that lies to
the left, and a playground copy is announced on success and on failure.
Both fail without their fix.

> _This was written by Claude Code on behalf of max-sixty_

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Nov 6, 2026
…are found by one automaton; an inline edge is no gap between words

The draft (#12). Placement tracked what a posted thread's anchor depends on and nothing
of the draft's, so on a page with no threads yet a script that rewrote the paragraph
around a sentence the user was commenting on took the draft's mark off the sentence
until the next presentation, and `pendingAt()` returned the passage in the old, now
disconnected node. The draft's anchor now stands among the threads' under a key no
thread bears: its quote in the index, its section among the ids, its text nodes among
those a rewrite settles at once. Placement tells those who hear it whether the draft
moved, and the anchor paint repaints the draft's mark from `pendingAt()`.

Ids in staged trees (#13). The watcher read the ids a change added or removed with a
light-tree `querySelectorAll`, so a widget whose shadow stage held a section, replaced
by one staged with the same section before it was put in place, left a section-only
thread on the disconnected old element. Ids are now read in the light tree and the
declared shadow trees an id is looked for in (`shadowRootsIn`, as `elementById` does).

One automaton (#14). The index found copies by hashing each quote's first 16 letters
and then its whole length, so at each place the first hash matched it tried every
length the quotes sharing it came in: 800 quotes of growing length sharing a run of x's
took 4.3 s in Chromium and 9.6 s in Firefox, about 8x per doubling. An Aho–Corasick
automaton over the quotes' letters (`automatonOf`) now finds every copy of every quote
in one pass, in time with the text, the quotes' total length and the copies found; the
matcher reads each copy's words against the page and keeps the fence and context rules
on top. No maintained dependency fits: the automaton is 70 lines and runs over a window
of the page's letters that a dependency's string API doesn't take. The hash keys,
their buckets and `keyStarts` go. `findEach`, Chromium then Firefox:
- #9's shape, 1,600 quotes alike but for a number: 14.2 to 12.1 ms, 36 to 12 ms;
- #14's shape, 400 and 800 quotes: 515 and 4,258 to 2.5 and 8.3 ms; 1,193 and 9,620 to 2
  and 8 ms.
The 1,600-mark page is unchanged: presentation 38.9 to 38.5 ms, edit 292 to 290 ms,
startup presented at 1,281 to 1,238 ms. The 1,600-section page's edit varied 6.5-11.9 ms
on de675ba and 6.5-13 ms here over three runs each; its move 1.2-1.8 against 1.4-1.8.

Word gaps (#15). The raw reading held an edge between any two text nodes and a quote's
gap matched one, so `one two`, rewritten as `<span>one</span><span>two</span>`, which
reads `onetwo`, stayed marked in both browsers while the file's reading detaches it. The
raw reading now holds a space wherever the reading reads one (a line break, a block's
end: `readSegments`' rule), an edge only between inline elements, and a gap must hold
whitespace: an edge may stand in a gap or inside a word, never be one. A quote across
two blocks no longer runs their words together (`boldtext` over `bold` and `text`
blocks), as in the file. Page search takes the same gap. tests/quote_cases.json gains
both cases, a line break, and an inline-edge word. Of the gaps the review named, a
line break and a block's end are spaces in both readings; `display: contents` and
generated content are style, which neither reading reads. On the 25 example pages,
7,055 quotes captured across each pair of adjacent text nodes all resolve to their own
words, or are repeated.

Tests, each failing on de675ba in Chromium and Firefox:
- test_a_draft_s_passage_keeps_its_mark_when_a_script_rewrites_around_it (#12), read
  once;
- test_a_section_staged_again_in_a_new_widget_keeps_its_thread (#13);
- test_words_a_script_sets_in_elements_of_their_own_run_together (#15).
Runtime, each failing on de675ba: the seeded check now runs pages holding only a
draft and stages filled before they are put in place, and checks the draft's placement
and section-only threads after every change; two quote cases; and a `findEach` test
that counts the automaton's lookups against the text and the strings' total length for
both shapes. The raw-reading test now expects a space at a block's end.
leaf-agent pushed a commit that referenced this pull request Nov 19, 2026
Bumps the dependencies group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [markdown-it-py](https://github.com/executablebooks/markdown-it-py) |
`4.2.0` | `4.3.0` |
| [mdit-py-plugins](https://github.com/executablebooks/mdit-py-plugins)
| `0.6.1` | `0.7.0` |
| [playwright](https://github.com/microsoft/playwright-python) |
`1.65.0` | `1.65.2` |
| [turbohtml](https://github.com/tox-dev/turbohtml) | `1.15.10` |
`1.15.11` |
| [ty](https://github.com/astral-sh/ty) | `0.0.99` | `0.0.104` |
| [ruff](https://github.com/astral-sh/ruff) | `0.17.4` | `0.17.5` |
|
[datamodel-code-generator](https://github.com/datamodel-code-generator/datamodel-code-generator)
| `0.91.0` | `0.96.0` |

Updates `markdown-it-py` from 4.2.0 to 4.3.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/executablebooks/markdown-it-py/releases">markdown-it-py's
releases</a>.</em></p>
<blockquote>
<h2>v4.3.0</h2>
<p>This release fixes two quadratic-time parsing paths that let crafted
input stall rendering for minutes (security),
aligns several parsing rules with CommonMark 0.31.2 and markdown-it
15.0.x,
turns parser rules that never advance into a <code>RuntimeError</code>
instead of an infinite loop,
makes rendering linear on PyPy and free-threaded CPython, and adds
support for Python 3.14.
Python 3.10 is still supported.
If you write plugins or render rules, or edit
<code>SyntaxTreeNode</code> trees, please read the upgrade notes at the
end.</p>
<h3>🔒 Security</h3>
<ul>
<li>👌 Fix quadratic-time inline parsing of long runs of characters that
start an inline rule without completing one (such as <code>&amp;</code>,
<code>&lt;</code>, <code>~</code> or incomplete entities), which let a
few hundred kilobytes of input stall rendering for seconds to minutes,
in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/423">#423</a>,
thanks to <a href="https://github.com/hdimer"><code>@​hdimer</code></a>
(<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/411">#411</a>)</li>
<li>👌 Reject unterminated inline HTML (<code>&lt;!--</code>,
<code>&lt;?</code>, <code>&lt;![CDATA[</code>, <code>&lt;!X</code>) in
constant time when <code>html</code> is enabled (as in the default
<code>commonmark</code> preset), instead of rescanning to the end of the
input for every opener, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/428">#428</a></li>
</ul>
<h3>✨ New</h3>
<ul>
<li>✨ Add <code>--enable-tables</code> to the CLI for file, standard
input and interactive parsing in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/425">#425</a>,
thanks to <a
href="https://github.com/user01010111"><code>@​user01010111</code></a>
(<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/422">#422</a>);
requested by <a
href="https://github.com/hartwork"><code>@​hartwork</code></a> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/352">#352</a></li>
<li>⬆️ Add support for Python 3.14 in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/462">#462</a></li>
</ul>
<h3>👌 Improved</h3>
<ul>
<li>👌 Raise <code>RuntimeError</code> instead of looping forever when a
block or inline rule reports a match without advancing (or moves
backwards), or when no block rule matches a line, as markdown-it does,
in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/444">#444</a>,
thanks to <a
href="https://github.com/rupayon123"><code>@​rupayon123</code></a>, <a
href="https://github.com/hukkin"><code>@​hukkin</code></a> (<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/336">#336</a>)
and <a
href="https://github.com/inchang-ing"><code>@​inchang-ing</code></a> (<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/443">#443</a>);
requested by <a
href="https://github.com/acaprino"><code>@​acaprino</code></a> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/441">#441</a></li>
<li>👌 Fix quadratic-time HTML rendering on PyPy, GraalPy and
free-threaded CPython by joining the rendered fragments once, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/458">#458</a>,
thanks to <a
href="https://github.com/DicksonWu654"><code>@​DicksonWu654</code></a></li>
<li>👌 Make <code>StateBase.src</code> a plain attribute, for about 4–11%
faster parsing on CPython, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/450">#450</a>,
thanks to <a
href="https://github.com/deadstrobe5"><code>@​deadstrobe5</code></a></li>
<li>👌 Build block line markers with one scan per line instead of one
step per character in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/449">#449</a>,
thanks to <a
href="https://github.com/John-Cusack"><code>@​John-Cusack</code></a></li>
<li>👌 Name the Windows end-of-input keys (Ctrl-Z then Enter) in the
CLI's interactive prompt and <code>-h</code> text in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/463">#463</a></li>
</ul>
<h3>🐛 Fixed</h3>
<ul>
<li>🐛 Fix HTML blocks of types 1–5 (comments, processing instructions,
declarations, CDATA,
<code>script</code>/<code>pre</code>/<code>style</code>/<code>textarea</code>)
ending at a blank line inside a list item or blockquote, porting
markdown-it 14.2.0, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/406">#406</a>,
thanks to <a
href="https://github.com/binggao1230"><code>@​binggao1230</code></a>;
reported by <a
href="https://github.com/Jayman2000"><code>@​Jayman2000</code></a> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/377">#377</a></li>
<li>🐛 Fix HTML block starts per CommonMark 0.31.2: lowercase
declarations such as <code>&lt;!doctype html&gt;</code> start a block
and interrupt a paragraph, and tag names match case-insensitively in
ASCII only, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/440">#440</a>,
thanks to <a
href="https://github.com/rupayon123"><code>@​rupayon123</code></a>;
reported by <a
href="https://github.com/p5ych0"><code>@​p5ych0</code></a> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/437">#437</a></li>
<li>🐛 Fix code spans rendered as literal backticks after an unclosed
link or image label, and count only U+0020 spaces (not tabs or no-break
spaces) when deciding whether to strip a code span's padding, porting
markdown-it 15.0.1, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/439">#439</a>,
thanks to <a
href="https://github.com/SparkUiX"><code>@​SparkUiX</code></a>; reported
by <a href="https://github.com/felzab"><code>@​felzab</code></a> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/438">#438</a></li>
<li>🐛 Trim and split with the CommonMark whitespace set instead of
Python's, so U+001C–U+001F and U+0085 are no longer dropped from
paragraphs, headings, table cells and fence info strings, and distinct
reference labels no longer match each other, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/433">#433</a>,
thanks to <a href="https://github.com/Nexory"><code>@​Nexory</code></a>
(<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/418">#418</a>)</li>
<li>🐛 Preserve IPv6 host brackets (e.g. <code>http://[::1]:8000/</code>)
in normalized link and image URLs, porting markdown-it 15.0.1, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/459">#459</a>,
thanks to <a
href="https://github.com/Jinyong-Li"><code>@​Jinyong-Li</code></a></li>
<li>🐛 Fix task-list detection consuming a literal <code>[
]</code>/<code>[x]</code> at the start of an indented code block in a
list item in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/451">#451</a>,
thanks to <a
href="https://github.com/AryanRG"><code>@​AryanRG</code></a></li>
<li>🐛 Fix an <code>IndexError</code> in the <code>html_block</code> and
<code>heading</code> rules at the end of the input (a table in a
blockquote that ends on <code>&gt;</code>) in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/416">#416</a>,
thanks to <a
href="https://github.com/saket3395"><code>@​saket3395</code></a>;
reported by <a
href="https://github.com/WilcoPancras"><code>@​WilcoPancras</code></a>
in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/415">#415</a></li>
<li>🐛 Keep backslash escapes and entities in image alt text (<code>![a
\*
b](https://github.com/executablebooks/markdown-it-py/blob/HEAD/u)</code>
gives <code>alt=&quot;a * b&quot;</code>), porting markdown-it 15.0.0,
in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/446">#446</a>,
thanks to <a
href="https://github.com/gyanu2507"><code>@​gyanu2507</code></a>;
reported by <a
href="https://github.com/kdeldycke"><code>@​kdeldycke</code></a> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/445">#445</a></li>
<li>🐛 Keep code span text in image alt text, porting markdown-it 15.0.0,
in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/460">#460</a>,
thanks to <a
href="https://github.com/jayhemnani9910"><code>@​jayhemnani9910</code></a></li>
<li>🐛 Keep hard breaks and inline HTML in image alt text in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/409">#409</a>,
thanks to <a
href="https://github.com/chuenchen309"><code>@​chuenchen309</code></a></li>
<li>🐛 Keep edits to the children of inline and image nodes in
<code>SyntaxTreeNode.to_tokens()</code> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/453">#453</a>,
thanks to <a
href="https://github.com/KennyMcSimpson"><code>@​KennyMcSimpson</code></a>;
edited tokens are copied, so the token stream the tree was built from is
left unchanged (<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/464">#464</a>)</li>
<li>🐛 Fix rule chains staying stale after <code>Ruler.enable</code>,
<code>disable</code> or <code>enableOnly</code> raised on an unknown
rule name in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/457">#457</a>,
thanks to <a
href="https://github.com/IlyaKhalafi"><code>@​IlyaKhalafi</code></a>;
reported in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/456">#456</a></li>
<li>🐛 Fix <code>MarkdownIt.enable()</code> and <code>disable()</code>
applying a generator of rule names only to the core chain in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/447">#447</a>,
thanks to <a
href="https://github.com/muneikh"><code>@​muneikh</code></a></li>
<li>🐛 Fix the CLI's interactive mode joining input lines with an extra
newline, which split every line into its own paragraph and broke hard
line breaks, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/425">#425</a>;
reported by <a
href="https://github.com/jamesquilty"><code>@​jamesquilty</code></a> in
<a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/172">#172</a></li>
<li>🐛 CLI helpers create a default parser only when none is given in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/455">#455</a>,
thanks to <a
href="https://github.com/Quinnod345"><code>@​Quinnod345</code></a></li>
</ul>
<h3>📚 Documentation</h3>
<ul>
<li>📚 Add a &quot;Third-party renderers&quot; section (mdformat,
mdit_plain, MyST-Parser) and document <code>RendererProtocol</code> for
writing your own renderer, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/463">#463</a></li>
<li>📚 Document that <code>MarkdownIt</code> passes itself to
<code>renderer_cls</code>, unlike markdown-it's renderer constructor, in
<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/421">#421</a>,
thanks to <a
href="https://github.com/user01010111"><code>@​user01010111</code></a></li>
<li>📚 Clarify that the name given to <code>add_render_rule</code> must
match a token type in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/432">#432</a>,
thanks to <a
href="https://github.com/hikmetba-bit"><code>@​hikmetba-bit</code></a></li>
<li>📚 Fix typos and use HTTPS for the CommonMark spec links in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/402">#402</a>,
<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/407">#407</a>
and <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/408">#408</a>,
thanks to <a
href="https://github.com/nikolas"><code>@​nikolas</code></a>, <a
href="https://github.com/maxtaran2010"><code>@​maxtaran2010</code></a>
and <a
href="https://github.com/deeferentleeg"><code>@​deeferentleeg</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/executablebooks/markdown-it-py/blob/master/CHANGELOG.md">markdown-it-py's
changelog</a>.</em></p>
<blockquote>
<h2>4.3.0 - 2026-11-10</h2>
<p>This release fixes two quadratic-time parsing paths that let crafted
input stall rendering for minutes (security),
aligns several parsing rules with CommonMark 0.31.2 and markdown-it
15.0.x,
turns parser rules that never advance into a <code>RuntimeError</code>
instead of an infinite loop,
makes rendering linear on PyPy and free-threaded CPython, and adds
support for Python 3.14.
Python 3.10 is still supported.
If you write plugins or render rules, or edit
<code>SyntaxTreeNode</code> trees, please read the upgrade notes at the
end.</p>
<h3>🔒 Security</h3>
<ul>
<li>👌 Fix quadratic-time inline parsing of long runs of characters that
start an inline rule without completing one (such as <code>&amp;</code>,
<code>&lt;</code>, <code>~</code> or incomplete entities), which let a
few hundred kilobytes of input stall rendering for seconds to minutes,
in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/423">#423</a>,
thanks to <a href="https://github.com/hdimer"><code>@​hdimer</code></a>
(<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/411">#411</a>)</li>
<li>👌 Reject unterminated inline HTML (<code>&lt;!--</code>,
<code>&lt;?</code>, <code>&lt;![CDATA[</code>, <code>&lt;!X</code>) in
constant time when <code>html</code> is enabled (as in the default
<code>commonmark</code> preset), instead of rescanning to the end of the
input for every opener, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/428">#428</a></li>
</ul>
<h3>✨ New</h3>
<ul>
<li>✨ Add <code>--enable-tables</code> to the CLI for file, standard
input and interactive parsing in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/425">#425</a>,
thanks to <a
href="https://github.com/user01010111"><code>@​user01010111</code></a>
(<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/422">#422</a>);
requested by <a
href="https://github.com/hartwork"><code>@​hartwork</code></a> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/352">#352</a></li>
<li>⬆️ Add support for Python 3.14 in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/462">#462</a></li>
</ul>
<h3>👌 Improved</h3>
<ul>
<li>👌 Raise <code>RuntimeError</code> instead of looping forever when a
block or inline rule reports a match without advancing (or moves
backwards), or when no block rule matches a line, as markdown-it does,
in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/444">#444</a>,
thanks to <a
href="https://github.com/rupayon123"><code>@​rupayon123</code></a>, <a
href="https://github.com/hukkin"><code>@​hukkin</code></a> (<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/336">#336</a>)
and <a
href="https://github.com/inchang-ing"><code>@​inchang-ing</code></a> (<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/443">#443</a>);
requested by <a
href="https://github.com/acaprino"><code>@​acaprino</code></a> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/441">#441</a></li>
<li>👌 Fix quadratic-time HTML rendering on PyPy, GraalPy and
free-threaded CPython by joining the rendered fragments once, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/458">#458</a>,
thanks to <a
href="https://github.com/DicksonWu654"><code>@​DicksonWu654</code></a></li>
<li>👌 Make <code>StateBase.src</code> a plain attribute, for about 4–11%
faster parsing on CPython, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/450">#450</a>,
thanks to <a
href="https://github.com/deadstrobe5"><code>@​deadstrobe5</code></a></li>
<li>👌 Build block line markers with one scan per line instead of one
step per character in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/449">#449</a>,
thanks to <a
href="https://github.com/John-Cusack"><code>@​John-Cusack</code></a></li>
<li>👌 Name the Windows end-of-input keys (Ctrl-Z then Enter) in the
CLI's interactive prompt and <code>-h</code> text in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/463">#463</a></li>
</ul>
<h3>🐛 Fixed</h3>
<ul>
<li>🐛 Fix HTML blocks of types 1–5 (comments, processing instructions,
declarations, CDATA,
<code>script</code>/<code>pre</code>/<code>style</code>/<code>textarea</code>)
ending at a blank line inside a list item or blockquote, porting
markdown-it 14.2.0, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/406">#406</a>,
thanks to <a
href="https://github.com/binggao1230"><code>@​binggao1230</code></a>;
reported by <a
href="https://github.com/Jayman2000"><code>@​Jayman2000</code></a> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/377">#377</a></li>
<li>🐛 Fix HTML block starts per CommonMark 0.31.2: lowercase
declarations such as <code>&lt;!doctype html&gt;</code> start a block
and interrupt a paragraph, and tag names match case-insensitively in
ASCII only, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/440">#440</a>,
thanks to <a
href="https://github.com/rupayon123"><code>@​rupayon123</code></a>;
reported by <a
href="https://github.com/p5ych0"><code>@​p5ych0</code></a> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/437">#437</a></li>
<li>🐛 Fix code spans rendered as literal backticks after an unclosed
link or image label, and count only U+0020 spaces (not tabs or no-break
spaces) when deciding whether to strip a code span's padding, porting
markdown-it 15.0.1, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/439">#439</a>,
thanks to <a
href="https://github.com/SparkUiX"><code>@​SparkUiX</code></a>; reported
by <a href="https://github.com/felzab"><code>@​felzab</code></a> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/438">#438</a></li>
<li>🐛 Trim and split with the CommonMark whitespace set instead of
Python's, so U+001C–U+001F and U+0085 are no longer dropped from
paragraphs, headings, table cells and fence info strings, and distinct
reference labels no longer match each other, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/433">#433</a>,
thanks to <a href="https://github.com/Nexory"><code>@​Nexory</code></a>
(<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/418">#418</a>)</li>
<li>🐛 Preserve IPv6 host brackets (e.g. <code>http://[::1]:8000/</code>)
in normalized link and image URLs, porting markdown-it 15.0.1, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/459">#459</a>,
thanks to <a
href="https://github.com/Jinyong-Li"><code>@​Jinyong-Li</code></a></li>
<li>🐛 Fix task-list detection consuming a literal <code>[
]</code>/<code>[x]</code> at the start of an indented code block in a
list item in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/451">#451</a>,
thanks to <a
href="https://github.com/AryanRG"><code>@​AryanRG</code></a></li>
<li>🐛 Fix an <code>IndexError</code> in the <code>html_block</code> and
<code>heading</code> rules at the end of the input (a table in a
blockquote that ends on <code>&gt;</code>) in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/416">#416</a>,
thanks to <a
href="https://github.com/saket3395"><code>@​saket3395</code></a>;
reported by <a
href="https://github.com/WilcoPancras"><code>@​WilcoPancras</code></a>
in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/415">#415</a></li>
<li>🐛 Keep backslash escapes and entities in image alt text (<code>![a
\*
b](https://github.com/executablebooks/markdown-it-py/blob/master/u)</code>
gives <code>alt=&quot;a * b&quot;</code>), porting markdown-it 15.0.0,
in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/446">#446</a>,
thanks to <a
href="https://github.com/gyanu2507"><code>@​gyanu2507</code></a>;
reported by <a
href="https://github.com/kdeldycke"><code>@​kdeldycke</code></a> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/445">#445</a></li>
<li>🐛 Keep code span text in image alt text, porting markdown-it 15.0.0,
in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/460">#460</a>,
thanks to <a
href="https://github.com/jayhemnani9910"><code>@​jayhemnani9910</code></a></li>
<li>🐛 Keep hard breaks and inline HTML in image alt text in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/409">#409</a>,
thanks to <a
href="https://github.com/chuenchen309"><code>@​chuenchen309</code></a></li>
<li>🐛 Keep edits to the children of inline and image nodes in
<code>SyntaxTreeNode.to_tokens()</code> in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/453">#453</a>,
thanks to <a
href="https://github.com/KennyMcSimpson"><code>@​KennyMcSimpson</code></a>;
edited tokens are copied, so the token stream the tree was built from is
left unchanged (<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/464">#464</a>)</li>
<li>🐛 Fix rule chains staying stale after <code>Ruler.enable</code>,
<code>disable</code> or <code>enableOnly</code> raised on an unknown
rule name in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/457">#457</a>,
thanks to <a
href="https://github.com/IlyaKhalafi"><code>@​IlyaKhalafi</code></a>;
reported in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/456">#456</a></li>
<li>🐛 Fix <code>MarkdownIt.enable()</code> and <code>disable()</code>
applying a generator of rule names only to the core chain in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/447">#447</a>,
thanks to <a
href="https://github.com/muneikh"><code>@​muneikh</code></a></li>
<li>🐛 Fix the CLI's interactive mode joining input lines with an extra
newline, which split every line into its own paragraph and broke hard
line breaks, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/425">#425</a>;
reported by <a
href="https://github.com/jamesquilty"><code>@​jamesquilty</code></a> in
<a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/172">#172</a></li>
<li>🐛 CLI helpers create a default parser only when none is given in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/455">#455</a>,
thanks to <a
href="https://github.com/Quinnod345"><code>@​Quinnod345</code></a></li>
</ul>
<h3>📚 Documentation</h3>
<ul>
<li>📚 Add a &quot;Third-party renderers&quot; section (mdformat,
mdit_plain, MyST-Parser) and document <code>RendererProtocol</code> for
writing your own renderer, in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/463">#463</a></li>
<li>📚 Document that <code>MarkdownIt</code> passes itself to
<code>renderer_cls</code>, unlike markdown-it's renderer constructor, in
<a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/421">#421</a>,
thanks to <a
href="https://github.com/user01010111"><code>@​user01010111</code></a></li>
<li>📚 Clarify that the name given to <code>add_render_rule</code> must
match a token type in <a
href="https://redirect.github.com/executablebooks/markdown-it-py/pull/432">#432</a>,
thanks to <a
href="https://github.com/hikmetba-bit"><code>@​hikmetba-bit</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/executablebooks/markdown-it-py/commit/d504583a458edfa399ee800074244fceec288862"><code>d504583</code></a>
🚀 RELEASE: v4.3.0 (<a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/466">#466</a>)</li>
<li><a
href="https://github.com/executablebooks/markdown-it-py/commit/9aa1aae4765cddd5890a53acf0b5b523a12a72eb"><code>9aa1aae</code></a>
👌 Fix quadratic-time rendering on PyPy and other interpreters (<a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/458">#458</a>)</li>
<li><a
href="https://github.com/executablebooks/markdown-it-py/commit/17b7227e8b287f1a158914bd02f4b6a3a620c813"><code>17b7227</code></a>
👌 Copy edited tokens in SyntaxTreeNode.to_tokens instead of writing in
place ...</li>
<li><a
href="https://github.com/executablebooks/markdown-it-py/commit/2542e66f123f4f23f0156b353c53c2fddc536719"><code>2542e66</code></a>
🐛 Fix HTML block start conditions per CommonMark 0.31.2 (<a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/440">#440</a>)</li>
<li><a
href="https://github.com/executablebooks/markdown-it-py/commit/cb36d3a1e7bfcc35e07c96d581f4a2e7ade04eda"><code>cb36d3a</code></a>
🐛 FIX: HTML block types 1–5 ending at a blank line inside a container
(<a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/406">#406</a>)</li>
<li><a
href="https://github.com/executablebooks/markdown-it-py/commit/f5af61fc11ca1c8f8601f2cc8df3cb2955a45f6d"><code>f5af61f</code></a>
🐛 FIX: Preserve code spans after unclosed link and image labels (<a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/439">#439</a>)</li>
<li><a
href="https://github.com/executablebooks/markdown-it-py/commit/1c70dcec10b245bfac7349a31725cc3a8ee06d40"><code>1c70dce</code></a>
👌 Make <code>StateBase.src</code> a plain attribute (<a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/450">#450</a>)</li>
<li><a
href="https://github.com/executablebooks/markdown-it-py/commit/2787da18ed25292da1b44f03385c4fbba159c35a"><code>2787da1</code></a>
🐛 Keep code span text in image alt text (<a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/460">#460</a>)</li>
<li><a
href="https://github.com/executablebooks/markdown-it-py/commit/01d077a5dd9c4464d436ba6df5992e359e397e4d"><code>01d077a</code></a>
🐛 FIX: Keep literal task markers in indented code blocks in list items
(<a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/451">#451</a>)</li>
<li><a
href="https://github.com/executablebooks/markdown-it-py/commit/2fcca3a970520693269fc3af5734e3e71b8168eb"><code>2fcca3a</code></a>
🐛 Keep backslash escapes and entities in image alt text (<a
href="https://redirect.github.com/executablebooks/markdown-it-py/issues/446">#446</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/executablebooks/markdown-it-py/compare/v4.2.0...v4.3.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `mdit-py-plugins` from 0.6.1 to 0.7.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/executablebooks/mdit-py-plugins/releases">mdit-py-plugins's
releases</a>.</em></p>
<blockquote>
<h2>v0.7.0</h2>
<p>A security and bug-fix release.
Plugin renderers now escape user content in HTML attribute, label and
math positions,
<code>attrs</code> drops event-handler attributes by default and
validates URL-valued attributes,
and the regular expressions in <code>texmath</code> <code>```math</code>
blocks and <code>admon</code> headers no longer backtrack polynomially
(<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/143">#143</a>).
It also fixes parser hangs in <code>gfm_autolink</code> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/160">#160</a>)
and <code>texmath</code> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/156">#156</a>),
and adds the <code>section_ref</code> plugin.
The release requires markdown-it-py &gt;= 3.0 and supports Python 3.10
to 3.14.
Several fixes change rendered output: see <strong>Upgrade notes</strong>
below.</p>
<h3>Upgrade notes</h3>
<ul>
<li><strong>Requires markdown-it-py &gt;= 3.0</strong> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/170">#170</a>).
The declared floor was 2.0, but 0.5.0 and later already failed to import
<code>subscript</code> with markdown-it-py 2.x.
<code>section_ref</code>, <code>gfm</code> and <code>gfm_autolink</code>
still need markdown-it-py &gt;= 4.1 and raise <code>RuntimeError</code>
on older versions.
Python 3.10 to 3.14 are supported.</li>
<li><strong><code>attrs_plugin</code> / <code>attrs_block_plugin</code>
defaults are stricter</strong> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/150">#150</a>).
With no <code>allowed</code> list, event-handler attributes (any key
starting with <code>on</code>, in any case) are removed
and moved to <code>token.meta[&quot;insecure_attrs&quot;]</code>;
<code>style</code> is kept.
Whatever <code>allowed</code> says, <code>href</code>, <code>src</code>,
<code>action</code>, <code>formaction</code> and <code>xlink:href</code>
are removed when <code>md.validateLink</code> rejects their value,
so <code>[a](https://x){href=&quot;javascript:alert(1)&quot;}</code>
keeps <code>href=&quot;https://x&quot;</code>.
Text spans (<code>[text]{...}</code>) now honour <code>allowed</code>,
which they used to bypass.
This is a baseline, not a sanitiser: for untrusted input, pass an
explicit list such as <code>allowed=(&quot;id&quot;,
&quot;class&quot;)</code>.</li>
<li><strong>Renderers escape their output</strong> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/150">#150</a>,
<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/165">#165</a>).
The <code>texmath</code> default renderer HTML-escapes the math source
(<code>$a&lt;b$</code> now renders
<code>&lt;eq&gt;a&amp;lt;b&lt;/eq&gt;</code>),
and the <code>dollarmath</code> equation label, the
<code>myst_block</code> target label, the <code>colon_fence</code> class
name
and the <code>tasklists</code> <code>label_after</code> label are
escaped too.
Benign text containing <code>&amp;</code>, <code>&lt;</code>,
<code>&gt;</code> or <code>&quot;</code> in these positions is now
emitted as entities.</li>
<li><strong><code>anchors_plugin</code> ids can change</strong> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/159">#159</a>).
An explicit heading id (such as <code>{#custom}</code> from
<code>attrs_block_plugin</code>) is now kept instead of being
overwritten,
and generated slugs avoid it.
The default slug function no longer strips whitespace from the title,
matching MyST-Parser's <code>github_slugify</code>:
a title that starts or ends with a space next to an image, raw HTML or
an entity gets a different id
(<code># Foo
![img](https://github.com/executablebooks/mdit-py-plugins/blob/HEAD/x.png)</code>
now gives <code>foo-</code>, it was <code>foo</code>).
To keep the old ids, pass <code>slug_func=lambda title:
slugify(title.strip())</code>, with <code>slugify</code> from
<code>mdit_py_plugins.anchors.index</code>.</li>
<li><strong><code>mdit_py_plugins.attrs.parse.parse()</code> raises on
an unterminated attribute group</strong>, instead of succeeding at the
end of the string
(<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/153">#153</a>).
Every plugin call site declines the group, so <code>`a`{.a</code> now
renders <code>&lt;code&gt;a&lt;/code&gt;{.a</code>; it used to drop the
<code>{.a</code>.</li>
<li><strong>The <code>section_ref</code> token shape is public
API</strong> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/169">#169</a>):
see its entry below.</li>
</ul>
<h3>🔒 Security</h3>
<p>Thanks to <a
href="https://github.com/KrisKennawayDD"><code>@​KrisKennawayDD</code></a>
for reporting these issues in <a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/143">#143</a>,
and to <a href="https://github.com/KyleKing"><code>@​KyleKing</code></a>
for the ReDoS analysis and fixes.</p>
<ul>
<li>
<p>🔒 FIX: Escape plugin renderer output and harden the
<code>attrs</code> defaults, thanks to <a
href="https://github.com/KyleKing"><code>@​KyleKing</code></a> for the
cross-plugin XSS test (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/150">#150</a>,
folding in <a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/151">#151</a>)</p>
<p>With markdown-it-py's <code>html</code> option off, untrusted
Markdown could still inject HTML or script through:
the <code>texmath</code> default renderer (math source), the
<code>dollarmath</code> equation label (<code>id</code> and permalink
<code>href</code>),</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/executablebooks/mdit-py-plugins/blob/master/CHANGELOG.md">mdit-py-plugins's
changelog</a>.</em></p>
<blockquote>
<h2>0.7.0 - 2026-11-10</h2>
<p>A security and bug-fix release.
Plugin renderers now escape user content in HTML attribute, label and
math positions,
<code>attrs</code> drops event-handler attributes by default and
validates URL-valued attributes,
and the regular expressions in <code>texmath</code> <code>```math</code>
blocks and <code>admon</code> headers no longer backtrack polynomially
(<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/143">#143</a>).
It also fixes parser hangs in <code>gfm_autolink</code> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/160">#160</a>)
and <code>texmath</code> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/156">#156</a>),
and adds the <code>section_ref</code> plugin.
The release requires markdown-it-py &gt;= 3.0 and supports Python 3.10
to 3.14.
Several fixes change rendered output: see <strong>Upgrade notes</strong>
below.</p>
<h3>Upgrade notes</h3>
<ul>
<li><strong>Requires markdown-it-py &gt;= 3.0</strong> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/170">#170</a>).
The declared floor was 2.0, but 0.5.0 and later already failed to import
<code>subscript</code> with markdown-it-py 2.x.
<code>section_ref</code>, <code>gfm</code> and <code>gfm_autolink</code>
still need markdown-it-py &gt;= 4.1 and raise <code>RuntimeError</code>
on older versions.
Python 3.10 to 3.14 are supported.</li>
<li><strong><code>attrs_plugin</code> / <code>attrs_block_plugin</code>
defaults are stricter</strong> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/150">#150</a>).
With no <code>allowed</code> list, event-handler attributes (any key
starting with <code>on</code>, in any case) are removed
and moved to <code>token.meta[&quot;insecure_attrs&quot;]</code>;
<code>style</code> is kept.
Whatever <code>allowed</code> says, <code>href</code>, <code>src</code>,
<code>action</code>, <code>formaction</code> and <code>xlink:href</code>
are removed when <code>md.validateLink</code> rejects their value,
so <code>[a](https://x){href=&quot;javascript:alert(1)&quot;}</code>
keeps <code>href=&quot;https://x&quot;</code>.
Text spans (<code>[text]{...}</code>) now honour <code>allowed</code>,
which they used to bypass.
This is a baseline, not a sanitiser: for untrusted input, pass an
explicit list such as <code>allowed=(&quot;id&quot;,
&quot;class&quot;)</code>.</li>
<li><strong>Renderers escape their output</strong> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/150">#150</a>,
<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/165">#165</a>).
The <code>texmath</code> default renderer HTML-escapes the math source
(<code>$a&lt;b$</code> now renders
<code>&lt;eq&gt;a&amp;lt;b&lt;/eq&gt;</code>),
and the <code>dollarmath</code> equation label, the
<code>myst_block</code> target label, the <code>colon_fence</code> class
name
and the <code>tasklists</code> <code>label_after</code> label are
escaped too.
Benign text containing <code>&amp;</code>, <code>&lt;</code>,
<code>&gt;</code> or <code>&quot;</code> in these positions is now
emitted as entities.</li>
<li><strong><code>anchors_plugin</code> ids can change</strong> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/159">#159</a>).
An explicit heading id (such as <code>{#custom}</code> from
<code>attrs_block_plugin</code>) is now kept instead of being
overwritten,
and generated slugs avoid it.
The default slug function no longer strips whitespace from the title,
matching MyST-Parser's <code>github_slugify</code>:
a title that starts or ends with a space next to an image, raw HTML or
an entity gets a different id
(<code># Foo
![img](https://github.com/executablebooks/mdit-py-plugins/blob/master/x.png)</code>
now gives <code>foo-</code>, it was <code>foo</code>).
To keep the old ids, pass <code>slug_func=lambda title:
slugify(title.strip())</code>, with <code>slugify</code> from
<code>mdit_py_plugins.anchors.index</code>.</li>
<li><strong><code>mdit_py_plugins.attrs.parse.parse()</code> raises on
an unterminated attribute group</strong>, instead of succeeding at the
end of the string
(<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/153">#153</a>).
Every plugin call site declines the group, so <code>`a`{.a</code> now
renders <code>&lt;code&gt;a&lt;/code&gt;{.a</code>; it used to drop the
<code>{.a</code>.</li>
<li><strong>The <code>section_ref</code> token shape is public
API</strong> (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/169">#169</a>):
see its entry below.</li>
</ul>
<h3>🔒 Security</h3>
<p>Thanks to <a
href="https://github.com/KrisKennawayDD"><code>@​KrisKennawayDD</code></a>
for reporting these issues in <a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/143">#143</a>,
and to <a href="https://github.com/KyleKing"><code>@​KyleKing</code></a>
for the ReDoS analysis and fixes.</p>
<ul>
<li>
<p>🔒 FIX: Escape plugin renderer output and harden the
<code>attrs</code> defaults, thanks to <a
href="https://github.com/KyleKing"><code>@​KyleKing</code></a> for the
cross-plugin XSS test (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/150">#150</a>,
folding in <a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/pull/151">#151</a>)</p>
<p>With markdown-it-py's <code>html</code> option off, untrusted
Markdown could still inject HTML or script through:</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/executablebooks/mdit-py-plugins/commit/faf100c1235392d73cb3c4bb6f5fdae539e2e7df"><code>faf100c</code></a>
🚀 RELEASE: v0.7.0 (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/171">#171</a>)</li>
<li><a
href="https://github.com/executablebooks/mdit-py-plugins/commit/1478f5b31fc01452b3f2b3092cca4cd893ef0f97"><code>1478f5b</code></a>
🔧 MAINTAIN: require markdown-it-py &gt;= 3.0, test the floor and Python
3.14 (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/170">#170</a>)</li>
<li><a
href="https://github.com/executablebooks/mdit-py-plugins/commit/89b1977acd17747f2a3b9f7140fb65377becc56d"><code>89b1977</code></a>
📚 DOCS: freeze the section_ref token shape and make its grammar
normative (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/169">#169</a>)</li>
<li><a
href="https://github.com/executablebooks/mdit-py-plugins/commit/7997835c8d831522b6b105d9e14128a4b0da16f6"><code>7997835</code></a>
🐛 FIX: section_ref no longer raises on very long digit runs (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/168">#168</a>)</li>
<li><a
href="https://github.com/executablebooks/mdit-py-plugins/commit/3e689b066ba4abadf145fff880e94f5f26cccf2e"><code>3e689b0</code></a>
🔧 Make the Codecov upload non-blocking (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/167">#167</a>)</li>
<li><a
href="https://github.com/executablebooks/mdit-py-plugins/commit/00bb6ecd892e1294c658bb9a459052bc0b77ec7a"><code>00bb6ec</code></a>
🔒 FIX: Escape plugin renderer output and harden <code>attrs</code>
defaults (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/150">#150</a>)</li>
<li><a
href="https://github.com/executablebooks/mdit-py-plugins/commit/e76aceac09fc8779ffd379b8ae289b602f5df8bc"><code>e76acea</code></a>
🔧 MAINTAIN: pre-commit autoupdate, pin ruff base rules (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/138">#138</a>)</li>
<li><a
href="https://github.com/executablebooks/mdit-py-plugins/commit/f4f4021ac37e9f9e2249597c6e5def98257cd033"><code>f4f4021</code></a>
🐛 FIX: ReDoS in texmath ```math blocks and admon headers (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/148">#148</a>)</li>
<li><a
href="https://github.com/executablebooks/mdit-py-plugins/commit/c1835a6387461769af65e2162891f2c68eecd266"><code>c1835a6</code></a>
🐛 FIX: anchors: keep explicit heading ids, do not strip slug titles (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/159">#159</a>)</li>
<li><a
href="https://github.com/executablebooks/mdit-py-plugins/commit/f1174539f4b7054ff3fa6f3693366be1e6e2f76e"><code>f117453</code></a>
🐛 FIX: texmath infinite loop on block math closed outside blockquote (<a
href="https://redirect.github.com/executablebooks/mdit-py-plugins/issues/157">#157</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/executablebooks/mdit-py-plugins/compare/v0.6.1...v0.7.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `playwright` from 1.65.0 to 1.65.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/microsoft/playwright-python/releases">playwright's
releases</a>.</em></p>
<blockquote>
<h2>v1.65.2</h2>
<h3>Highlights</h3>
<p><a
href="https://redirect.github.com/microsoft/playwright/pull/44098">microsoft/playwright#44098</a>
- browser(chromium): roll to r1255, v159.0.8154.6</p>
<h2>Browser Versions</h2>
<ul>
<li>Chromium 159.0.8154.6</li>
</ul>
<h2>v1.65.1</h2>
<h3>Highlights</h3>
<p><a
href="https://redirect.github.com/microsoft/playwright-python/pull/3337">microsoft/playwright-python#3337</a>
- chore: roll Node.js to 26.13.1
<a
href="https://redirect.github.com/microsoft/playwright-python/pull/3331">microsoft/playwright-python#3331</a>
- devops(docker): install libatomic1 for the Node.js binary of the
driver
<a
href="https://redirect.github.com/microsoft/playwright-python/pull/3336">microsoft/playwright-python#3336</a>
- fix(docker): upgrade base image packages during the build</p>
<p>The bundled Node.js 26.13.1 is a <a
href="https://github.com/nodejs/node/releases/tag/v26.13.1">security
release</a> with fixes in <code>tls</code>, <code>http</code>,
<code>https</code> and <code>http2</code>. The driver uses Node.js for
its own network connections, for example <code>connect_over_cdp</code>
to a <code>wss://</code> endpoint.</p>
<p>The Docker images now include <code>libatomic1</code>, which the
Node.js binary of the driver needs, and the latest security updates of
the Ubuntu packages.</p>
<h2>Browser Versions</h2>
<ul>
<li>Chromium 158.0.8127.18</li>
<li>Mozilla Firefox 159.0</li>
<li>WebKit 27.2</li>
</ul>
<p>This version was also tested against the following stable
channels:</p>
<ul>
<li>Google Chrome 157</li>
<li>Microsoft Edge 156</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/microsoft/playwright-python/commit/dcc92ee2bf036353e3105891929199b445f7047b"><code>dcc92ee</code></a>
chore: roll Playwright to 1.65.1 (bbd948344e) (<a
href="https://redirect.github.com/microsoft/playwright-python/issues/3346">#3346</a>)</li>
<li><a
href="https://github.com/microsoft/playwright-python/commit/eecddbc671d90fc75af385ae4b93663b0e96b2fb"><code>eecddbc</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright-python/issues/3337">#3337</a>):
chore: roll Node.js to 26.13.1</li>
<li><a
href="https://github.com/microsoft/playwright-python/commit/696ec60069e2c3410be521ef9fbb045455169ef3"><code>696ec60</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright-python/issues/3336">#3336</a>):
fix(docker): upgrade base image packages during the build</li>
<li><a
href="https://github.com/microsoft/playwright-python/commit/ad6bc4b7e8f6773bdf3dfc3e92609d9de6cba5e3"><code>ad6bc4b</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright-python/issues/3333">#3333</a>):
devops(docker): publish stable images from the tip of a r...</li>
<li><a
href="https://github.com/microsoft/playwright-python/commit/c0f3b22e603872ae7933c74b1da5542d0f466d02"><code>c0f3b22</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright-python/issues/3331">#3331</a>):
devops(docker): install libatomic1 for the Node.js binary...</li>
<li>See full diff in <a
href="https://github.com/microsoft/playwright-python/compare/v1.65.0...v1.65.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `turbohtml` from 1.15.10 to 1.15.11
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tox-dev/turbohtml/releases">turbohtml's
releases</a>.</em></p>
<blockquote>
<h2>v1.15.11</h2>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
<h3>Bug fixes</h3>
<ul>
<li>Prevent phone-number extensions with many separators from writing
past the recognizer's chunk buffer. Preserve XML comment boundaries
after invalid controls are removed and exact carriage returns and line
feeds in CLI text files. Deeply nested XPath expressions now raise
<code>XPathDepthError</code> during parsing, matching evaluation (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/1675">#1675</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.</li>
<li><code>Element.insert()</code> and <code>ElementView.insert()</code>
no longer slow down with the number of siblings when inserting near
either end of a long child list (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2150">#2150</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1695">#1695</a>)</li>
<li>After a handler edit, <code>rewrite</code> writes the markup that
follows, and a <code>&lt;</code> the edit left before it, so a browser
reads them as it read the input (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2146">#2146</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1701">#1701</a>)</li>
<li>XML Schema validation now rejects child elements in an element
declared with an inline <code>xs:simpleType</code>, as it already does
for a <code>type=</code> declaration (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2127">#2127</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1708">#1708</a>)</li>
<li>Reading or clearing every attribute of an element with many
attributes, or removing them by name from either end, now takes time
linear in the attribute count (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2174">#2174</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1709">#1709</a>)</li>
<li>Multi-step XSD extensions now require every base type's content, so
complete documents are accepted and incomplete ones rejected; invalid
xs:all extensions now raise (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2135">#2135</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1716">#1716</a>)</li>
<li>Keep <code>computed_style</code> fast on deeply nested documents in
any call order, instead of restyling every ancestor on each call (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2181">#2181</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1718">#1718</a>)</li>
<li>Sanitizer checks now judge each value as the XML serializer writes
it too, so dropped control characters can no longer rejoin CSS, URLs, or
template markers the checks refused (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2116">#2116</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1728">#1728</a>)</li>
<li>Minified CSS keeps the separator after a name ending in an escaped
character, so the output parses as the input did (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2161">#2161</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1729">#1729</a>)</li>
<li>Read <code>&lt;meta http-equiv=refresh&gt;</code> targets as
browsers do, so <code>links()</code>, <code>rewrite_links()</code>,
<code>resolve_links()</code> and <code>meta_refresh()</code> agree, and
text right after the delay is no redirect (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2126">#2126</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1737">#1737</a>)</li>
<li>A loop of <code>Range</code> calls over the children of one wide
element no longer slows down with the square of the child count (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2144">#2144</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1743">#1743</a>)</li>
<li><code>minify_css</code> no longer brings to life an
<code>@import</code>, <code>@namespace</code>, <code>@charset</code> or
<code>@layer</code> statement that browsers ignore, and keeps an empty
rule that holds one back (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2145">#2145</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1745">#1745</a>)</li>
<li>XPath regex searches with back-references now count every capture
group against the step limit, so such patterns raise
<code>ValueError</code> instead of running past it (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2131">#2131</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1746">#1746</a>)</li>
<li>XPath expressions that nest predicates or operators around
<code>matches()</code>, <code>replace()</code> or extension functions no
longer slow down with each level of nesting (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2179">#2179</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1748">#1748</a>)</li>
<li>rewrite() no longer adds a tag where an empty end tag or removed
node sat between a <code>&lt;</code> and text, including raw text past
the nesting cap (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2195">#2195</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1752">#1752</a>)</li>
<li>Keep the doctype's public and system identifiers and forced quirks
mode in <code>to_source</code>, so the output reparses in the source's
document mode (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2141">#2141</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1757">#1757</a>)</li>
<li><code>rewrite()</code> no longer lets a removed
<code>&lt;script&gt;</code> through on pages nested past 8,192 open
elements; edits it cannot apply there raise <code>ValueError</code> (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2196">#2196</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1758">#1758</a>)</li>
<li>Link extraction, rewriting and sanitizing now read
<code>srcset</code> candidates like a browser: commas inside parentheses
no longer split a candidate, and candidates with invalid descriptors are
skipped (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2148">#2148</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1759">#1759</a>)</li>
<li>Repeatedly assigning <code>Text.data</code>,
<code>Comment.data</code> or the <code>etree</code> <code>text</code>
and <code>tail</code> properties now keeps memory proportional to the
current text instead of every value assigned (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2133">#2133</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1760">#1760</a>)</li>
<li>Minifying a <code>style</code> attribute now drops the rest of a
declaration broken by a <code>{}</code> block or a stray <code>}</code>,
rather than letting it apply (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2151">#2151</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1763">#1763</a>)</li>
<li>XML Schema and RELAX NG range facets now judge the whole of a long
numeric value instead of a truncated prefix of it (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2164">#2164</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1764">#1764</a>)</li>
<li><code>xs:list</code> and <code>xs:union</code> values are now
checked against their item or member types, including
<code>xs:NMTOKENS</code>, <code>xs:IDREFS</code> and
<code>xs:ENTITIES</code>, instead of accepting any text (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2147">#2147</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1765">#1765</a>)</li>
<li>Style attributes and <code>&lt;style&gt;</code> bodies no longer
keep properties outside <code>css_properties</code> that browsers apply,
and drop declarations containing a unicode-range token (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2137">#2137</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1768">#1768</a>)</li>
<li>Edits that leave <code>&lt;style&gt;</code> elements alone no longer
make <code>computed_style</code> recompile every sheet, and changes to a
style's type or text apply at once (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2166">#2166</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1770">#1770</a>)</li>
<li>A code block whose language contains a backtick is now fenced
without that language, so its text stays code instead of being read as
Markdown (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2153">#2153</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1771">#1771</a>)</li>
<li>Serialized and minified HTML no longer lets a script run past its
end tag and turn later content into live markup (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2173">#2173</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1773">#1773</a>)</li>
<li>Long <code>&lt;meta&gt;</code> charset values are read in full, so
padded labels resolve, and a <code>charset</code> that names no encoding
no longer hides a <code>content</code> declaration, as in browsers (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2155">#2155</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1775">#1775</a>)</li>
<li><code>minify</code> output now reads the same in browsers that run
scripts: <code>&lt;noscript&gt;</code> content is copied from the
source, and a page whose <code>&lt;noscript&gt;</code> content parses
differently there keeps everything after it unminified (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2154">#2154</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1776">#1776</a>)</li>
<li>XPath function calls with many arguments now run in linear time when
the expression uses regex or extension functions (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2156">#2156</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1778">#1778</a>)</li>
<li>minify_css keeps the separators that a unicode-range start, an
unclosed calc() or a universal selector needs, and stops crashing on
some bang comments (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2198">#2198</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1835">#1835</a>)</li>
<li><code>minify_css</code> keeps a hash color that contains a CSS
escape as written instead of shortening it, so the escape no longer
swallows the closing brace of its rule (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2191">#2191</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1849">#1849</a>)</li>
<li><code>minify_css</code> keeps a rule whose selector starts with a
combinator, such as <code>&gt;</code> or <code>~</code>, rather than
dropping it or merging it into the rule before (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2192">#2192</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1850">#1850</a>)</li>
<li>CSS minification now keeps a selector with three or more colons as
written, and minifying the output again changes nothing (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2200">#2200</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1851">#1851</a>)</li>
<li>Minified CSS no longer glues a <code>calc()</code>-unwrapped value
to the token after it, and a <code>calc()</code> group left open at end
of input folds in one pass (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2197">#2197</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1852">#1852</a>)</li>
<li>Minifying CSS with stray brackets, hex escapes or CDO/CDC tokens now
gives the same output on a second pass, drops declarations whose name
holds a bracket, and folds an unclosed nested <code>calc()</code> (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2194">#2194</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1853">#1853</a>)</li>
<li>Sanitized markup now re-parses to the same tree when an option or
optgroup would otherwise nest inside an option (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/1856">#1856</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1854">#1854</a>)</li>
<li>Reparsing serialized output no longer changes a
<code>selectedcontent</code> placed after its option (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/1861">#1861</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1859">#1859</a>)</li>
<li>Sanitized output no longer writes implied tbody, tr, or colgroup
tags a policy omits; REMOVE now keeps cells under them (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/1862">#1862</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1860">#1860</a>)</li>
<li>Content after a table element or template refused at the nesting
limit is kept, and a refused template's end tag closes only that
template (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/1865">#1865</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1863">#1863</a>)</li>
<li>Serialization writes carriage returns as
<code>&amp;[#13](https://github.com/tox-dev/turbohtml/issues/13);</code>
in text and attribute values, so sanitized and minified output stays
unchanged when parsed and serialized again (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/1866">#1866</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/1864">#1864</a>)</li>
<li>Named groups holding an <code>xs:all</code> now accept their
children in any order, and an <code>xs:all</code> nested in a sequence
or choice fails to compile (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2028">#2028</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/2015">#2015</a>)</li>
<li>XSD validation now accepts valid content for repeated particles with
minOccurs of two or more whose repetitions can match no children (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2075">#2075</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/2017">#2017</a>)</li>
<li>Canonical XML and XML serialization now drop characters XML 1.0
forbids from CDATA sections, text and attribute values, so the output
parses (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2039">#2039</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/2024">#2024</a>)</li>
<li><code>canonicalize</code> on HTML-parsed trees now renders the
<code>xmlns:</code> declarations that prefixed names use, so the output
reparses in the same namespaces; a relative namespace URI raises
<code>ValueError</code> (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2040">#2040</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/2025">#2025</a>)</li>
<li>A schema that repeats an <code>xs:all</code> group, through a group
reference or an <code>xs:all</code> element with maxOccurs above 1, now
fails to compile (<a
href="https://redirect.github.com/tox-dev/turbohtml/pull/2031">#2031</a>)
by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a>.
(<a
href="https://redirect.github.com/tox-dev/turbohtml/issues/2029">#2029</a>)<…
max-sixty added a commit that referenced this pull request Nov 26, 2026
…age data on first visits

Codex's review of the previous commit found faults in it, numbered as its findings
are:

- #1: the door refused a comment a reader genuinely drew. A revision digests a
  value alone, so the same value republished under another contract read as a
  contract the seat never drew. The door now refuses only a current reading that
  holds an error; an input of another contract is left to `page check`.
- #3: on Linux two writes can share a change time, so the separate change-time
  stat still missed a same-size rewrite with the old modification time (35 of
  100 cache trials, 86 of 100 news trials), and the hosted publisher's
  fingerprint (`record_reading`) ignored it. `file_stamp` takes `changed`, which
  adds the change time from the same stat and settles on the later of the two
  times, and every reader of a bound file (news, the hosted fingerprint, the
  source's cache and run) stamps it that way.
- #10: comments keep the file's own revision, but the previous commit made the
  served state's tail resend a publication's unchanged value on every rerun (one
  256 KiB rerun grew the answer from 362 bytes to 262 KB), and a validation
  cached by the file's revision went stale when the label moved. A bound file's
  whole value now has its own digest, kept with its reading, which the tail
  compares (`data.value_key`) and validation keys on; the tail's rerun test is
  back as it was.
- #12: the first-visit state dropped a publication only a thread's widget binds,
  and advertised the version of all data while sending part of it, so a tab
  naming that version never got the rest. It now holds every source a document
  or message of the page binds, and the version of exactly those
  (`page_data.bound_data`), in place of the export's filter, which leaves
  messages out.
- #13 (part): a widget's construction in `leaf page state` said an input of
  another contract had its value available. It now says it has none, with why.
  `page check` still finds a file bound under another contract only in the
  page's own markup, not in a sample's or a message's.
- #14: a read failure whose cause the file's stamp doesn't name, such as a
  symlink in its path, stayed cached after its cause cleared. A source holding
  an error is now read again each time.
- #15: looking up one source for the door read every bound file. It now reads
  the one it names.
max-sixty added a commit that referenced this pull request Nov 26, 2026
… and leave drafts off first visits

Codex's review of the previous commit confirmed #3 fixed on Linux and macOS and
found these still open:

- #10: two overlapping state requests could lose a relabel, since a reading the
  file cache no longer held fell back to the file's revision, which leaves the
  label out. `data.value_key` now takes the digest kept with that exact reading,
  and digests any other reading of a bound file afresh; a publication still
  stands in by its revision, so a rerun sends no value.
- #12: first visits held every binding `working_data_bindings` knows, the
  unpublished source's among them, so a binding only `index.html` holds put its
  file in the public state. `bound_data` now reads the published revisions and
  the messages, and not the draft.
- #14: a symlink put in a bound file's path and taken out again moved neither the
  news nor the run, and a file holding bad bytes was read again on every state
  read. A bound file's observation (`file_bindings.observed`), which the news,
  the hosted fingerprint and the source's cache all read, now also says whether
  its path names it without a symlink, so every reading, an error's included, is
  kept under it.
- #15: admission read every publication to learn whether a source was supplied.
  It now asks for the one source first, and reads the others only where that
  source holds nothing.

Still open, and reported: #1's comment on a file an input of another contract
binds after its page was checked, and a contract that pins the file's name,
which a new label then breaks; #13's file-contract check, which reaches the
page's own markup and not a sample's or a message's; and the copy of a file
source into a live sample, which takes a publication's revision.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants