@@ -111,14 +111,9 @@ pub(crate) struct MarkdownWithToc<'a>(
111111 pub ( crate ) Edition ,
112112 pub ( crate ) & ' a Option < Playground > ,
113113) ;
114- /// A tuple struct like `Markdown` that renders the markdown escaping HTML tags.
115- pub ( crate ) struct MarkdownHtml < ' a > (
116- pub ( crate ) & ' a str ,
117- pub ( crate ) & ' a mut IdMap ,
118- pub ( crate ) ErrorCodes ,
119- pub ( crate ) Edition ,
120- pub ( crate ) & ' a Option < Playground > ,
121- ) ;
114+ /// A tuple struct like `Markdown` that renders the markdown escaping HTML tags
115+ /// and includes no paragraph tags.
116+ pub ( crate ) struct MarkdownItemInfo < ' a > ( pub ( crate ) & ' a str , pub ( crate ) & ' a mut IdMap ) ;
122117/// A tuple struct like `Markdown` that renders only the first paragraph.
123118pub ( crate ) struct MarkdownSummaryLine < ' a > ( pub & ' a str , pub & ' a [ RenderedLink ] ) ;
124119
@@ -1072,9 +1067,9 @@ impl MarkdownWithToc<'_> {
10721067 }
10731068}
10741069
1075- impl MarkdownHtml < ' _ > {
1070+ impl MarkdownItemInfo < ' _ > {
10761071 pub ( crate ) fn into_string ( self ) -> String {
1077- let MarkdownHtml ( md, ids, codes , edition , playground ) = self ;
1072+ let MarkdownItemInfo ( md, ids) = self ;
10781073
10791074 // This is actually common enough to special-case
10801075 if md. is_empty ( ) {
@@ -1093,7 +1088,9 @@ impl MarkdownHtml<'_> {
10931088 let p = HeadingLinks :: new ( p, None , ids, HeadingOffset :: H1 ) ;
10941089 let p = Footnotes :: new ( p) ;
10951090 let p = TableWrapper :: new ( p. map ( |( ev, _) | ev) ) ;
1096- let p = CodeBlocks :: new ( p, codes, edition, playground) ;
1091+ let p = p. filter ( |event| {
1092+ !matches ! ( event, Event :: Start ( Tag :: Paragraph ) | Event :: End ( Tag :: Paragraph ) )
1093+ } ) ;
10971094 html:: push_html ( & mut s, p) ;
10981095
10991096 s
0 commit comments