Skip to content

Commit 3a763d1

Browse files
committed
[scripts] ,markdown-to-html: replace sed -z with perl
sed -z was only available on gnused
1 parent ce897f9 commit 3a763d1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/.local/bin/utils/,markdown-to-html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pandoc --no-highlight \
2323
--template "$DATAFILES_PATH/pandoc-github-template.html" \
2424
--output - -f gfm -t html5 \
2525
--metadata title="$(basename "$input")" "$input" |
26-
sed -z 's|<pre class="mermaid"><code>\([^<]*\)</code></pre>|<div class="mermaid">\1</div>|g' >"$outfile"
26+
perl -0777 -pe 's|<pre class="mermaid"><code>([^<]*)</code></pre>|<div class="mermaid">$1</div>|g' >"$outfile"
2727
# we can safely use `<` in sed as pandoc will convert < in code to &le
2828

2929
[ -z "$NO_OPEN" ] && open "$outfile"

0 commit comments

Comments
 (0)