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 {
629629
630630#[ cfg( test) ]
631631mod tests {
632- use super :: { LangString , Markdown } ;
632+ use super :: { LangString , Markdown , MarkdownHtml } ;
633633 use super :: plain_summary_line;
634634 use html:: render:: reset_ids;
635635
@@ -735,4 +735,15 @@ mod tests {
735735 t ( "# top header" , "top header" ) ;
736736 t ( "## header" , "header" ) ;
737737 }
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+ }
738749}
You can’t perform that action at this time.
0 commit comments