File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -629,7 +629,7 @@ pub fn plain_summary_line(md: &str) -> String {
629
629
630
630
#[ cfg( test) ]
631
631
mod tests {
632
- use super :: { LangString , Markdown } ;
632
+ use super :: { LangString , Markdown , MarkdownHtml } ;
633
633
use super :: plain_summary_line;
634
634
use html:: render:: reset_ids;
635
635
@@ -735,4 +735,15 @@ mod tests {
735
735
t ( "# top header" , "top header" ) ;
736
736
t ( "## header" , "header" ) ;
737
737
}
738
+
739
+ #[ test]
740
+ fn test_markdown_html_escape ( ) {
741
+ fn t ( input : & str , expect : & str ) {
742
+ let output = format ! ( "{}" , MarkdownHtml ( input) ) ;
743
+ assert_eq ! ( output, expect) ;
744
+ }
745
+
746
+ t ( "`Struct<'a, T>`" , "<p><code>Struct<'a, T></code></p>\n " ) ;
747
+ t ( "Struct<'a, T>" , "<p>Struct<'a, T></p>\n " ) ;
748
+ }
738
749
}
You can’t perform that action at this time.
0 commit comments