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<br>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.
This commit is contained in:
1 parent
49d4aab4e2
commit
27bed49ee4
1 file changed
+16
@@ -1014,3 +1014,19 @@ class TestRendererGateRegressions7618:
|
||||
assert out.count("<tr>") == 3
|
||||
assert "OAuth<br>API keys<br>tokens" in out
|
||||
assert "LRU<br>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<br>x | n |\n|---|---| trailing")
|
||||
assert "<table>" not in out
|
||||
|
||||
def test_indented_and_padded_table_still_preserves_br(self, driver_path):
|
||||
out = _render(driver_path, " | a | b |\n |---|---|\n | x<br>y | z |")
|
||||
assert "<table>" in out
|
||||
assert "x<br>y" in out
|
||||
Reference in new issue
Block a user