@@ -229,10 +229,7 @@ impl Markdown {
229 Event::End(tag) => {
229 Event::End(tag) => {
230 tags.pop();
230 tags.pop();
231 match tag {
231 match tag {
232− Tag::Heading(_, _, _)
232+ Tag::Heading(_, _, _) | Tag::Paragraph | Tag::CodeBlock(_) | Tag::Item => {
234− | Tag::CodeBlock(CodeBlockKind::Fenced(_))
236 push_line(&mut spans, &mut lines);
233 push_line(&mut spans, &mut lines);
@@ -240,17 +237,18 @@ impl Markdown {
241 // whenever heading, code block or paragraph closes, empty line
238 // whenever heading, code block or paragraph closes, empty line
242 match tag {
239 match tag {
243− Tag::Heading(_, _, _)
240+ Tag::Heading(_, _, _) | Tag::Paragraph | Tag::CodeBlock(_) => {
245− | Tag::CodeBlock(CodeBlockKind::Fenced(_)) => {
246 lines.push(Spans::default());
241 lines.push(Spans::default());
251 Event::Text(text) => {
246 Event::Text(text) => {
252− // TODO: temp workaround
253− if let Some(Tag::CodeBlock(CodeBlockKind::Fenced(language))) = tags.last() {
247+ if let Some(Tag::CodeBlock(kind)) = tags.last() {
248+ let language = match kind {
249+ CodeBlockKind::Fenced(language) => language,
250+ CodeBlockKind::Indented => "",
254 let tui_text = highlighted_code_block(
252 let tui_text = highlighted_code_block(
255 text.to_string(),
253 text.to_string(),
256 language,
254 language,