From 61cfcc780dbd14333feb4e135dfe8399dc654f1d Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 5 Aug 2025 16:20:36 +0300 Subject: fix bare blocks so lines in there can start with [[ --- lib/html.source.sh | 7 ------- lib/template.source.sh | 9 ++++++++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/html.source.sh b/lib/html.source.sh index 3c2a3dc..f6ee8e6 100644 --- a/lib/html.source.sh +++ b/lib/html.source.sh @@ -343,13 +343,6 @@ this if [ -z $foo ]; then echo $foo fi -```' - assert::contains "$(html::fromgmi <<< "$input_block")" 'GNU source-highlight' - - input_block='```AUTO -if [ -z $foo ]; then - echo $foo -fi ```' assert::contains "$(html::fromgmi <<< "$input_block")" 'GNU source-highlight' fi diff --git a/lib/template.source.sh b/lib/template.source.sh index 8ab19d5..9a2ff38 100644 --- a/lib/template.source.sh +++ b/lib/template.source.sh @@ -65,7 +65,14 @@ $line" echo "$line" ;; esac - done | $SED 's/^\[\[\[/<<>>/; s/^\[\[/</;' + done | $SED -E ' + /^```/,/^```/! { + s/^\[\[\[/<<>>/; + s/^\[\[/</; + } + ' } template::_line () { -- cgit v1.2.3