diff options
| author | Paul Buetow <paul@buetow.org> | 2025-08-05 16:20:36 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-08-05 16:20:36 +0300 |
| commit | 61cfcc780dbd14333feb4e135dfe8399dc654f1d (patch) | |
| tree | 59c5690e1ba9e4ea3c6684ac1dd3efee6aff7e5e | |
| parent | 0177f9d40b7eb0dd33138923927b4d117a26c394 (diff) | |
fix bare blocks so lines in there can start with [[
| -rw-r--r-- | lib/html.source.sh | 7 | ||||
| -rw-r--r-- | 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 @@ -345,12 +345,5 @@ if [ -z $foo ]; then 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/^\]\]\]/>>>/; s/^\[\[/<</; s/^\]/>/;' + done | $SED -E ' + /^```/,/^```/! { + s/^\[\[\[/<<</; + s/^\]\]\]/>>>/; + s/^\[\[/<</; + s/^\]/>/; + } + ' } template::_line () { |
