@@ -64,15 +64,6 @@ fn stripped_filtered_line<'a>(s: &'a str) -> Option<&'a str> {
64
64
}
65
65
}
66
66
67
- /// Returns a new string with all consecutive whitespace collapsed into
68
- /// single spaces.
69
- ///
70
- /// Any leading or trailing whitespace will be trimmed.
71
- #[ allow( dead_code) ]
72
- fn collapse_whitespace ( s : & str ) -> String {
73
- s. split_whitespace ( ) . collect :: < Vec < _ > > ( ) . join ( " " )
74
- }
75
-
76
67
thread_local ! ( pub static PLAYGROUND_KRATE : RefCell <Option <Option <String >>> = {
77
68
RefCell :: new( None )
78
69
} ) ;
@@ -285,11 +276,9 @@ pub fn plain_summary_line(md: &str) -> String {
285
276
let events = Parser :: new ( md) . map ( |ev| match ev {
286
277
CmEvent :: Start ( Tag :: Code ) => CmEvent :: Text ( Cow :: Borrowed ( "`" ) ) ,
287
278
CmEvent :: End ( Tag :: Code ) => CmEvent :: Text ( Cow :: Borrowed ( "`" ) ) ,
288
- CmEvent :: Start ( Tag :: Link ( _, text) ) => CmEvent :: Text ( text) ,
289
- CmEvent :: Start ( Tag :: Image ( _, text) ) => CmEvent :: Text ( text) ,
290
- CmEvent :: Html ( html) | CmEvent :: InlineHtml ( html) => CmEvent :: Text ( html) ,
291
- ev @ CmEvent :: Text ( _) => ev,
292
- _ => CmEvent :: Html ( Cow :: Borrowed ( "" ) ) ,
279
+ CmEvent :: Text ( _) => ev,
280
+ //CmEvent::SoftBreak | CmEvent::HardBreak => ev,
281
+ _ => CmEvent :: Text ( Cow :: Borrowed ( "" ) ) ,
293
282
} ) ;
294
283
295
284
let hm_toks = cmark_hamlet:: Adapter :: new ( events, false ) ;
0 commit comments