File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,6 +117,19 @@ def test_prose_after_block_preserved(self):
117117 prose_idx = lines .index ("More prose here." )
118118 assert prose_idx > fence_close
119119
120+ def test_prose_ending_in_double_colon_no_indented_block (self ):
121+ """Prose line ending in :: with no indented block following loses the :: but is otherwise intact."""
122+ text = "Refer to namespace::\n \n Next paragraph (not indented)."
123+ result = _convert_rst_code_blocks (text )
124+ assert "```" not in result
125+ assert "Refer to namespace" in result
126+ assert "Next paragraph (not indented)." in result
127+
128+ def test_double_colon_mid_line_not_treated_as_rst (self ):
129+ """:: mid-line (e.g. namespace::method) does not trigger RST block conversion."""
130+ text = "Use namespace::method() here.\n \n More text."
131+ assert _convert_rst_code_blocks (text ) == text
132+
120133 def test_empty_string (self ):
121134 """Empty input returns empty string."""
122135 assert _convert_rst_code_blocks ("" ) == ""
You can’t perform that action at this time.
0 commit comments