diff --git a/Cargo.lock b/Cargo.lock index a9d4dbc..f42cf99 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -1855,9 +1855,9 @@ dependencies = [ [[package]] name = "pulldown-cmark" -version = "0.9.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" +checksum = "83c41efbf8f90ac44de7f3a868f0867851d261b56291732d0cbf7cceaaeb55a6" dependencies = [ "bitflags 2.6.0", "memchr", diff --git a/Cargo.toml b/Cargo.toml index 0b867de..6f019db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ lazy_static = "1.4" log = "0.4.22" minimad = "0.13.1" percent-encoding = "2.1" -pulldown-cmark = { version = "0.9.6", default-features = false } +pulldown-cmark = { version = "0.13", default-features = false } rayon = "1.5" reqwest = { version = "0.12.7", features = ["gzip", "json"] } scraper = "0.20.0" diff --git a/src/tui/markdown.rs b/src/tui/markdown.rs index b79536c..0398aaa 100644 --- a/src/tui/markdown.rs +++ b/src/tui/markdown.rs @@ -10,7 +10,7 @@ use cursive::theme::{Effect, PaletteColor, Style}; use cursive::utils::markup::{StyledIndexedSpan, StyledString}; use cursive::utils::span::{IndexedCow, IndexedSpan}; -use pulldown_cmark::{self, CowStr, Event, HeadingLevel, Options, Tag}; +use pulldown_cmark::{self, CowStr, Event, HeadingLevel, Options, Tag, TagEnd}; pub type Markdown = StyledString; @@ -79,16 +79,16 @@ fn parse_spans(input: &str) -> Vec { } /// Iterator that parse a markdown text and outputs styled spans. -pub struct Parser<'a, 'b> { +pub struct Parser<'a> { first: bool, item: Option, in_list: bool, after_code_block: bool, stack: Vec