Upgrade pulldown-cmark from 0.9 to 0.10
This commit is contained in:
parent
c3e282b441
commit
2a6d31a023
@ -62,7 +62,7 @@ indexmap = { version = "2.0.0", features = ["serde"] }
|
|||||||
js_int = { workspace = true, features = ["serde"] }
|
js_int = { workspace = true, features = ["serde"] }
|
||||||
js_option = "0.1.0"
|
js_option = "0.1.0"
|
||||||
percent-encoding = "2.1.0"
|
percent-encoding = "2.1.0"
|
||||||
pulldown-cmark = { version = "0.9.1", default-features = false, optional = true }
|
pulldown-cmark = { version = "0.10.3", optional = true, default-features = false, features = ["html"] }
|
||||||
regex = { version = "1.5.6", default-features = false, features = ["std", "perf"] }
|
regex = { version = "1.5.6", default-features = false, features = ["std", "perf"] }
|
||||||
ruma-common = { workspace = true }
|
ruma-common = { workspace = true }
|
||||||
ruma-html = { workspace = true, optional = true }
|
ruma-html = { workspace = true, optional = true }
|
||||||
|
@ -894,7 +894,7 @@ pub struct CustomEventContent {
|
|||||||
|
|
||||||
#[cfg(feature = "markdown")]
|
#[cfg(feature = "markdown")]
|
||||||
pub(crate) fn parse_markdown(text: &str) -> Option<String> {
|
pub(crate) fn parse_markdown(text: &str) -> Option<String> {
|
||||||
use pulldown_cmark::{Event, Options, Parser, Tag};
|
use pulldown_cmark::{Event, Options, Parser, Tag, TagEnd};
|
||||||
|
|
||||||
const OPTIONS: Options = Options::ENABLE_TABLES.union(Options::ENABLE_STRIKETHROUGH);
|
const OPTIONS: Options = Options::ENABLE_TABLES.union(Options::ENABLE_STRIKETHROUGH);
|
||||||
|
|
||||||
@ -919,7 +919,7 @@ pub(crate) fn parse_markdown(text: &str) -> Option<String> {
|
|||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
let is_paragraph_end = matches!(event, Event::End(Tag::Paragraph));
|
let is_paragraph_end = matches!(event, Event::End(TagEnd::Paragraph));
|
||||||
|
|
||||||
!is_text && !is_break && !is_first_paragraph_start && !is_paragraph_end
|
!is_text && !is_break && !is_first_paragraph_start && !is_paragraph_end
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user