summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/hedgedoc2quarto11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/hedgedoc2quarto b/bin/hedgedoc2quarto
index 1aac608..23832ea 100755
--- a/bin/hedgedoc2quarto
+++ b/bin/hedgedoc2quarto
@@ -35,20 +35,23 @@ die 'Too many arguments: expected INFILE and OUTFILE' if $bogus;
@ARGV = ($infile) if $infile;
my $content = <>;
-$content =~ s/^(?'fence'[``~]{3,})\s*\Kmermaid\n(?'type'gantt)\n(?'code'.*?\n)\k'fence'$/
+$content
+ =~ s/^(?'fence'[``~]{3,})\s*\Kmermaid\n(?'type'gantt)\n(?'code'.*?\n)\k'fence'$/
"{mermaid}\n\%\%| fig-width: 100\%\n"
. &mmd2mmd( $+{type}, $+{code} )
. $+{fence}
/gsme;
if ($outfile) {
- open(FH, '>', $outfile) or die $!;
+ open( FH, '>', $outfile ) or die $!;
print FH $content;
-} else {
+}
+else {
print $content;
}
-sub mmd2mmd( $type, $code ) {
+sub mmd2mmd ( $type, $code )
+{
if ( $type eq 'gantt' ) {
$code = "tickInterval 1month\n$code";
}