Browse Source

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

pull/14710/head
Yurii Motov 5 months ago
parent
commit
7ff3dfb4fc
  1. 3
      scripts/doc_parsing_utils.py

3
scripts/doc_parsing_utils.py

@ -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

Loading…
Cancel
Save