aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/hedgedoc2quarto8
1 files changed, 8 insertions, 0 deletions
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