diff --git a/static/ui.js b/static/ui.js index f2e54b58..0c7c7fa6 100644 --- a/static/ui.js +++ b/static/ui.js @@ -6148,7 +6148,7 @@ function renderMd(raw){ // Tables: | col | col | header row followed by | --- | --- | separator then data rows // NOTE: table pass runs BEFORE outer link pass so [label](url) in table cells // is handled by inlineMd() only — prevents double-linking. - s=s.replace(/((?:^[ \t]{0,3}\|.+\|[ \t]*\n?)+)/gm,block=>{ + s=s.replace(/((?:^ {0,3}\|.+\|[ \t]*\n?)+)/gm,block=>{ const rows=block.trim().split('\n').filter(r=>r.trim()); if(rows.length<2)return block; const isSep=r=>/^\|[\s|:-]+\|$/.test(r.trim()); diff --git a/tests/test_issue5641_table_whitespace.py b/tests/test_issue5641_table_whitespace.py index adb17a85..2d5edd15 100644 --- a/tests/test_issue5641_table_whitespace.py +++ b/tests/test_issue5641_table_whitespace.py @@ -31,6 +31,7 @@ def test_table_rows_with_edge_whitespace_still_render_as_table(driver_path, src) out = _render(driver_path, src) assert "
| 1 | " in out + assert "