Skip to content

Commit

Permalink
Fix comments and add some logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpallant committed Nov 21, 2024
1 parent a557567 commit 23daf8c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,12 @@ pub fn generate_deck(
// Find end-of-block, in case it's the end of a diagram.
if line == "```" {
if let Some(diagram_str) = collecting_diagram.take() {
// This is the end of a mermaid block
println!("Got graph: {:?}", diagram_str);
// This is the end of a dot block
log::debug!("Got graph: {:?}", diagram_str);
log::info!(
"Calling graphviz to render diagram in {}",
in_path.display()
);
let diagram = graphviz_rust::exec_dot(
diagram_str,
vec![graphviz_rust::cmd::CommandArg::Format(
Expand All @@ -265,7 +269,7 @@ pub fn generate_deck(
if let Some(graph_str) = collecting_diagram.as_mut() {
graph_str.push_str(line);
graph_str.push('\n');
// Don't emit the mermaid code
// Don't emit the dot code
continue;
}

Expand Down

0 comments on commit 23daf8c

Please sign in to comment.