From 5abb3e80d6b09851a58e18bfc9ee0ffeb861a4b8 Mon Sep 17 00:00:00 2001 From: Yash Karandikar Date: Sat, 16 Apr 2022 21:54:37 -0500 Subject: [PATCH] markdown moment --- src/main.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 811d648..56a750a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -268,7 +268,18 @@ impl EventHandler for Handler { Start(tag) => match tag { Emphasis => computed.push('\x1D'), Strong => computed.push('\x02'), - Link(_, dest, _) => computed.push_str(&dest), + Link(_, dest, _) => { + computed.push_str(&dest); + continue; + } + List(num) => { + if let Some(num) = num { + computed.push_str(&format!("{}. ", num)); + } else { + computed.push_str("- "); + } + } + BlockQuote => computed.push_str("> "), _ => {} }, _ => {}