Add hash-style-comments and slash-style-comments code block languages

This commit is contained in:
Yurii Motov
2026-01-05 11:21:58 +01:00
parent 9aa406d624
commit 7ff3dfb4fc

View File

@@ -592,6 +592,7 @@ def replace_multiline_code_block(
"toml",
"yaml",
"yml",
"hash-style-comments",
}:
_line_a_code, line_a_comment = _split_hash_comment(line_a)
line_b_code, line_b_comment = _split_hash_comment(line_b)
@@ -599,7 +600,7 @@ def replace_multiline_code_block(
if line_b_comment:
res_line = res_line.replace(line_b_comment, line_a_comment, 1)
code_block.append(res_line)
elif block_language in {"console", "json"}:
elif block_language in {"console", "json", "slash-style-comments"}:
_line_a_code, line_a_comment = _split_slashes_comment(line_a)
line_b_code, line_b_comment = _split_slashes_comment(line_b)
res_line = line_b