From 27bed49ee47e56fa60e3ae33d46ff51ca56d55d0 Mon Sep 17 00:00:00 2001 From: n Date: Fri, 18 Sep 2026 22:41:56 +0000 Subject: [PATCH] test(renderer): pin master-parity for malformed trailing-text table rows Round-3 gate finding: the downstream table regex lacks an end-of-line anchor, so it accepts a prefix that the physical-line guard rejects (e.g. '| h
x | n |\n|---|---| trailing'). Measured against MASTER rather than against the intermediate commit: master does not render that input as a table either, so the stage is at parity, not regressed. Across the edge-case matrix (indented, CRLF, trailing-space, padded separator, blank-line delimited, mid-document) the stage is equal to master on the two malformed inputs and strictly better on six genuine tables. Pinned as a regression so any future change to the table guard has to make a deliberate decision about this input instead of changing it silently. --- tests/test_renderer_js_behaviour.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_renderer_js_behaviour.py b/tests/test_renderer_js_behaviour.py index 80bfecda..d3e5c3b1 100644 --- a/tests/test_renderer_js_behaviour.py +++ b/tests/test_renderer_js_behaviour.py @@ -1014,3 +1014,19 @@ class TestRendererGateRegressions7618: assert out.count("") == 3 assert "OAuth
API keys
tokens" in out assert "LRU
60s TTL" in out + + def test_row_with_trailing_text_after_closing_pipe_matches_master(self, driver_path): + """Pins parity with master for a malformed row that has text past the last pipe. + + The downstream table regex lacks an end-of-line anchor, so it accepts a + prefix the physical-line guard rejects. Master does NOT render this as a + table either, so preserving prose here is parity, not a regression. Pinned + so a future table-guard change has to make a deliberate decision about it. + """ + out = _render(driver_path, "| h
x | n |\n|---|---| trailing") + assert "" not in out + + def test_indented_and_padded_table_still_preserves_br(self, driver_path): + out = _render(driver_path, " | a | b |\n |---|---|\n | x
y | z |") + assert "
" in out + assert "x
y" in out