Skip to content

Commit

Permalink
Bump pulldown-cmark
Browse files Browse the repository at this point in the history
  • Loading branch information
lampsitter committed May 20, 2024
1 parent e2ff4f8 commit 7aa6704
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/target
**/target
Cargo.lock
egui_commonmark_macros/wip/
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ egui_commonmark_macros = { version = "0.16.0", path = "egui_commonmark_macros",
# To add features to documentation
document-features = { version = "0.2" }

pulldown-cmark = { version = "0.10", default-features = false }
pulldown-cmark = { version = "0.11", default-features = false }
7 changes: 6 additions & 1 deletion egui_commonmark/src/parsers/pulldown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@ impl CommonMarkViewerInternal {
ui.add(ImmutableCheckbox::without_text(&mut checkbox));
}
}

pulldown_cmark::Event::InlineMath(_) | pulldown_cmark::Event::DisplayMath(_) => {}
}
}

Expand Down Expand Up @@ -430,7 +432,10 @@ impl CommonMarkViewerInternal {
HeadingLevel::H6 => 5,
});
}
pulldown_cmark::Tag::BlockQuote => {

// deliberately not using the built in alerts from pulldown-cmark as
// the markdown itself cannot be localized :( e.g: [!TIP]
pulldown_cmark::Tag::BlockQuote(_) => {
self.is_blockquote = true;
}
pulldown_cmark::Tag::CodeBlock(c) => {
Expand Down
6 changes: 5 additions & 1 deletion egui_commonmark_macros/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ impl CommonMarkViewerInternal {
quote!(ui.add(egui_commonmark_backend::ImmutableCheckbox::without_text(&mut #checkbox));)
}
}

pulldown_cmark::Event::InlineMath(_) | pulldown_cmark::Event::DisplayMath(_) => {
TokenStream::new()
}
}
}

Expand Down Expand Up @@ -472,7 +476,7 @@ impl CommonMarkViewerInternal {

quote!(egui_commonmark_backend::newline(ui);)
}
pulldown_cmark::Tag::BlockQuote => {
pulldown_cmark::Tag::BlockQuote(_) => {
self.is_blockquote = true;
TokenStream::new()
}
Expand Down

0 comments on commit 7aa6704

Please sign in to comment.