From dfef328a9a5bb3054557b5564f809166d98aa439 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 3 May 2024 16:10:54 +0200 Subject: handle dot graphs --- bin/hedgedoc2quarto | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bin') diff --git a/bin/hedgedoc2quarto b/bin/hedgedoc2quarto index c81ddd5..5e2eb70 100755 --- a/bin/hedgedoc2quarto +++ b/bin/hedgedoc2quarto @@ -37,6 +37,14 @@ die 'Too many arguments: expected INFILE and OUTFILE' if $bogus; @ARGV = ($infile) if $infile; my $content = do { local $/ = undef; <> }; +# TODO: integrate with subroutine handler below +$content =~ s/^ + (?'fence'[``~]{3,})\s* + \Kgraphviz\n + (?'code'.*?\n) + \k'fence' + $/{dot}\n\/\/| fig-width: 100\%\n$+{code}$+{fence}/gsmx; + $content =~ s/^ (?'fence'[``~]{3,})\s* \Kmermaid\n -- cgit v1.2.3