File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -587,11 +587,12 @@ mod tests {
587587
588588 #[ test]
589589 fn test_sanitize_preserves_markdown_headings ( ) {
590+ // Markdown headings and bare issue references must not be neutralized.
591+ // A bare "#123" (without a preceding bot keyword like "fixes") must NOT
592+ // be wrapped in backticks — this assertion would pass even if "#123"
593+ // were wrapped, so we assert the exact output instead.
590594 let input = "# Heading\n ## Sub-heading\n Issue #123" ;
591- let result = sanitize ( input) ;
592- assert ! ( result. contains( "# Heading" ) ) ;
593- assert ! ( result. contains( "## Sub-heading" ) ) ;
594- assert ! ( result. contains( "#123" ) ) ;
595+ assert_eq ! ( sanitize( input) , input) ;
595596 }
596597
597598 // ── sanitize_config tests ─────────────────────────────────────────────
@@ -622,8 +623,10 @@ mod tests {
622623
623624 #[ test]
624625 fn test_sanitize_config_removes_control_chars ( ) {
625- let input = "hello\x00 world\x07 !" ;
626- assert_eq ! ( sanitize_config( input) , "helloworld!" ) ;
626+ // ANSI escape sequences must be stripped through the config pipeline.
627+ // "\x1b[0m" is the ANSI reset code; it should be removed, joining "val" and "ue".
628+ let input = "val\x1b [0mue" ;
629+ assert_eq ! ( sanitize_config( input) , "value" ) ;
627630 }
628631
629632 #[ test]
You can’t perform that action at this time.
0 commit comments