From 2a34b90d1e47dfdcdf513f0bfc3baa914baaffd8 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 16 Oct 2026 18:04:13 -1000 Subject: Keep underscores inside words out of emphasis --- tests/extensions/test-about-render.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/extensions/test-about-render.lua') diff --git a/tests/extensions/test-about-render.lua b/tests/extensions/test-about-render.lua index e84c854..3925dfd 100644 --- a/tests/extensions/test-about-render.lua +++ b/tests/extensions/test-about-render.lua @@ -108,6 +108,12 @@ out = render("README.md", "an __up__ and _down_ word") h.contains("double underscores embolden", out, "up") h.contains("single underscores lean", out, "down") +out = render("README.md", "snake_case_name and _lean_ and foo__bar__") +h.contains("underscores inside words stay literal", out, "

snake_case_name and lean and foo__bar__

") + +out = render("README.md", "_a_b_ and __c_d__") +h.contains("emphasis spans an underscore inside a word", out, "

a_b and c_d

") + out = render("README.md", "\\*not leaning\\* and \\# and \\q") h.contains("a backslash makes punctuation literal", out, "

*not leaning* and # and \\q

") -- cgit