From 0cee92c9f6a36074a8e9d82d00767206e2c6749e Mon Sep 17 00:00:00 2001 From: TomBanksAU <246584738+TomBanksAU@users.noreply.github.com> Date: Mon, 22 Jun 2026 06:55:09 +0000 Subject: [PATCH] test: update fenced markdown expectations --- tests/test_1325_user_fenced_code.py | 2 +- tests/test_csv_table_rendering.py | 4 +++- tests/test_issue_code_syntax_highlight.py | 7 ++++--- tests/test_renderer_js_behaviour.py | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/test_1325_user_fenced_code.py b/tests/test_1325_user_fenced_code.py index be918a4b1..240e45604 100644 --- a/tests/test_1325_user_fenced_code.py +++ b/tests/test_1325_user_fenced_code.py @@ -126,7 +126,7 @@ class TestUserFencedBlocks: def test_four_backtick_outer_fence_preserves_inner_triple_fence(self): """User-message code fences should follow CommonMark fence-length matching too.""" out = _run_user_render("````md\n```inner\nfoo\n```\n````") - assert out.count("
") == 1
+ assert out.count("") == 1
assert out.count("") == 1
assert 'md' in out
assert "```inner" in out
diff --git a/tests/test_csv_table_rendering.py b/tests/test_csv_table_rendering.py
index a2afc3da1..b86c413f8 100644
--- a/tests/test_csv_table_rendering.py
+++ b/tests/test_csv_table_rendering.py
@@ -41,7 +41,9 @@ def test_csv_fence_fallback_for_insufficient_rows():
src = f.read()
fence_section = src[src.find("lang==='csv'"):src.find("lang==='csv'") + 800]
assert 'rows.length>=2' in fence_section, "Should check for at least 2 rows"
- assert '"
+ assert '' in fence_section, (
+ "Fallback should render via the shared preClass-aware code-block template"
+ )
def test_csv_media_file_handler():
diff --git a/tests/test_issue_code_syntax_highlight.py b/tests/test_issue_code_syntax_highlight.py
index d83617a67..d6dedd3d8 100644
--- a/tests/test_issue_code_syntax_highlight.py
+++ b/tests/test_issue_code_syntax_highlight.py
@@ -17,9 +17,10 @@ def test_fenced_code_blocks_add_prism_language_class():
def test_fenced_code_blocks_keep_existing_pre_header_layout():
js = _read_ui_js()
# The fenced code rendering was moved into the stash callback (#1154 fix).
- # The template string now uses `lang` instead of `normalizedLang`.
- assert '${h}${esc(code.replace(/\\n$/,' in js, (
- "The syntax-highlight fix should preserve the existing fenced code block layout"
+ # The template string now uses `lang` instead of `normalizedLang`, and
+ # markdown-source fences may add a dedicated md-source-block class.
+ assert '${h}${esc(code.replace(/\\n$/,' in js, (
+ "The syntax-highlight fix should preserve the shared fenced code block layout"
)
assert '' not in js, (
"This fix should not introduce a new wrapper around fenced code blocks"
diff --git a/tests/test_renderer_js_behaviour.py b/tests/test_renderer_js_behaviour.py
index 2a84905a5..0c63cc6e0 100644
--- a/tests/test_renderer_js_behaviour.py
+++ b/tests/test_renderer_js_behaviour.py
@@ -397,7 +397,7 @@ class TestFencedCodeFenceLength:
"That is much more correct than pretending"
)
out = _render(driver_path, src)
- assert out.count("") == 1
+ assert out.count("") == 1
assert out.count("") == 1
assert 'md' in out
assert "```novelcrafter" in out
@@ -408,7 +408,7 @@ class TestFencedCodeFenceLength:
def test_four_backtick_outer_fence_preserves_inner_triple_fence(self, driver_path):
out = _render(driver_path, "````md\n```inner\nfoo\n```\n````\n")
- assert out.count("") == 1
+ assert out.count("") == 1
assert out.count("") == 1
assert 'md' in out
assert "```inner" in out