diff options
author | Jonas Smedegaard <dr@jones.dk> | 2024-05-03 16:10:54 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2024-06-04 17:35:41 +0200 |
commit | dfef328a9a5bb3054557b5564f809166d98aa439 (patch) | |
tree | 5c3037048c968aa72438f345a1eeb8d4769f2e2c /bin | |
parent | acc67d550f2b5e60d5ce1dfa90d8dc3f0270f63a (diff) |
handle dot graphs
Diffstat (limited to 'bin')
-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 |