From 9d45310e24203a829197c4b6a571395807b1560b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 13 Jul 2026 09:15:53 +0200 Subject: [PATCH 1/3] Apply suggested fix to utils/g.md2man/tests/g_md2man_test.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- utils/g.md2man/tests/g_md2man_test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/g.md2man/tests/g_md2man_test.py b/utils/g.md2man/tests/g_md2man_test.py index 440c5bda492..6c76644efbf 100644 --- a/utils/g.md2man/tests/g_md2man_test.py +++ b/utils/g.md2man/tests/g_md2man_test.py @@ -397,3 +397,8 @@ def test_comment_kept_in_fenced_code(tmp_path): def test_comment_parsing_unit(): lines = ["a b c", "d"] assert gmd.strip_html_comments(lines) == ["a b ", " c", "d"] + + +def test_strip_html_comments_keeps_comment_in_fenced_code_unit(): + lines = ["```html", "", "```", "x y"] + assert gmd.strip_html_comments(lines) == ["```html", "", "```", "x y"] From 009a5fdc14b561dbc38a247bc713880e33cee138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 13 Jul 2026 09:15:54 +0200 Subject: [PATCH 2/3] Apply suggested fix to utils/g.md2man/tests/g_md2man_test.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- utils/g.md2man/tests/g_md2man_test.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/utils/g.md2man/tests/g_md2man_test.py b/utils/g.md2man/tests/g_md2man_test.py index 6c76644efbf..08a5fc7b4b5 100644 --- a/utils/g.md2man/tests/g_md2man_test.py +++ b/utils/g.md2man/tests/g_md2man_test.py @@ -161,6 +161,14 @@ def test_unordered_list_nested(tmp_path): result = convert("- first\n- second\n - nested\n", tmp_path) assert result.count(".IP \\(bu 4n") == 3 # codespell:ignore bu assert ".RS 4n" in result + assert ".RE" in result + + rs_index = result.find(".RS 4n") + re_index = result.find(".RE", rs_index) + assert rs_index != -1 + assert re_index != -1 + assert rs_index < re_index + assert ".IP \\(bu 4n" in result[rs_index:re_index] def test_wrapped_number_line_is_not_a_list(tmp_path): From 54d22b1ad7c21d38492d62bbe8815a853b65adeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 13 Jul 2026 07:27:49 +0000 Subject: [PATCH 3/3] Apply ruff format --- utils/g.md2man/tests/g_md2man_test.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/g.md2man/tests/g_md2man_test.py b/utils/g.md2man/tests/g_md2man_test.py index 08a5fc7b4b5..3592ea43811 100644 --- a/utils/g.md2man/tests/g_md2man_test.py +++ b/utils/g.md2man/tests/g_md2man_test.py @@ -409,4 +409,9 @@ def test_comment_parsing_unit(): def test_strip_html_comments_keeps_comment_in_fenced_code_unit(): lines = ["```html", "", "```", "x y"] - assert gmd.strip_html_comments(lines) == ["```html", "", "```", "x y"] + assert gmd.strip_html_comments(lines) == [ + "```html", + "", + "```", + "x y", + ]