1
0
Fork 0
mirror of https://github.com/Nutomic/ibis.git synced 2024-10-25 22:29:52 +00:00

Add markdown sub/superscript (fixes #85)

This commit is contained in:
Felix Ableitner 2024-10-25 10:46:47 +02:00
parent e0fa36c62e
commit f8948c2e20
3 changed files with 24 additions and 0 deletions

20
Cargo.lock generated
View file

@ -1748,6 +1748,8 @@ dependencies = [
"markdown-it-block-spoiler",
"markdown-it-footnote",
"markdown-it-heading-anchors",
"markdown-it-sub",
"markdown-it-sup",
"once_cell",
"pretty_assertions",
"rand",
@ -2335,6 +2337,24 @@ dependencies = [
"markdown-it",
]
[[package]]
name = "markdown-it-sub"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8abe3aa8927af2314644b3aae37393241a229e869ff9c95ac640749e08357d2a"
dependencies = [
"markdown-it",
]
[[package]]
name = "markdown-it-sup"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ae949e78c7a615f88a47019d51b65962bfc5c4cbc65fa81eae8b9b2506d1cb1"
dependencies = [
"markdown-it",
]
[[package]]
name = "matchit"
version = "0.7.3"

View file

@ -84,6 +84,8 @@ include_dir = "0.7.4"
markdown-it-block-spoiler = "1.0.0"
markdown-it-heading-anchors = "0.3.0"
markdown-it-footnote = "0.2.0"
markdown-it-sub = "1.0.0"
markdown-it-sup = "1.0.0"
[dev-dependencies]
pretty_assertions = "1.4.1"

View file

@ -35,6 +35,8 @@ fn markdown_parser() -> MarkdownIt {
markdown_it::plugins::extra::tables::add(&mut parser);
markdown_it::plugins::extra::typographer::add(&mut parser);
markdown_it_block_spoiler::add(&mut parser);
markdown_it_sub::add(&mut parser);
markdown_it_sup::add(&mut parser);
parser.inline.add_rule::<ArticleLinkScanner>();
parser.inline.add_rule::<MathEquationScanner>();
parser