summaryrefslogtreecommitdiffstats
path: root/src/bin/mdbook-mermaid.rs
diff options
context:
space:
mode:
authorJan-Erik Rediger <janerik@fnordig.de>2022-01-25 21:51:56 +0100
committerJan-Erik Rediger <janerik@fnordig.de>2022-01-25 22:17:47 +0100
commitdb5c14c79232c2d6cc5ada8a0fd44c55e448aec2 (patch)
tree7476f95d9763ed6aabf754b0b50529ea984f064e /src/bin/mdbook-mermaid.rs
parent87b54eeeefac6dda1a0fb1fc166cec70339eac7b (diff)
Avoid roundtripping through pulldown-cmark
Roundtripping markdown is actually quite hard. We don't actually require that. All we need is once parsing the markdown to find the mermaid code blocks. We then manually generate HTML and all other content can be copied unparsed again.
Diffstat (limited to 'src/bin/mdbook-mermaid.rs')
-rw-r--r--src/bin/mdbook-mermaid.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/mdbook-mermaid.rs b/src/bin/mdbook-mermaid.rs
index 085bfbb..dec9657 100644
--- a/src/bin/mdbook-mermaid.rs
+++ b/src/bin/mdbook-mermaid.rs
@@ -73,7 +73,7 @@ fn handle_preprocessing() -> Result<(), Error> {
fn handle_supports(sub_args: &ArgMatches) -> ! {
let renderer = sub_args.value_of("renderer").expect("Required argument");
- let supported = Mermaid.supports_renderer(&renderer);
+ let supported = Mermaid.supports_renderer(renderer);
// Signal whether the renderer is supported by exiting with 1 or 0.
if supported {