diff options
author | Jonas Smedegaard <dr@jones.dk> | 2024-05-03 16:10:54 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2024-05-03 16:10:54 +0200 |
commit | 02c83c9638a4701bf223eb4cbf57cfa2587a5a0a (patch) | |
tree | 0a76f1b76f1735143fc609d7ecd1188fda9eec4d /bin/hedgedoc2quarto | |
parent | f18a687d57e842e818df1b26071d518cc621d065 (diff) |
handle dot graphs
Diffstat (limited to 'bin/hedgedoc2quarto')
-rwxr-xr-x | bin/hedgedoc2quarto | 8 |
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 |