diff options
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | lib/template.source.sh | 12 |
2 files changed, 11 insertions, 2 deletions
@@ -168,7 +168,6 @@ See more entries about DTail and Golang: Blablabla... ``` - ### Alternative configuration file path If you don't want to mess with `gemtexter.conf`, you can use an alternative config file path in `~/.config/gemtexter.conf`, which takes precedence if it exists. Another way is to set the `CONFIG_FILE_PATH` environment variable, e.g.: diff --git a/lib/template.source.sh b/lib/template.source.sh index 38d9d3d..ec49490 100644 --- a/lib/template.source.sh +++ b/lib/template.source.sh @@ -57,7 +57,7 @@ $line" echo "$line" ;; esac - done + done | $SED 's/^\[\[\[/<<</; s/^\]\]\]/>>>/; s/^\[\[/<</;' } template::_line () { @@ -123,4 +123,14 @@ Just so that you know' >>> << :' assert::equals "$(template::_generate <<< "$template4")" '' + + local -r template5='[[ echo foo +[[[ + echo bar +]]]' + local -r expect5='<< echo foo +<<< + echo bar +>>>' + assert::equals "$(template::_generate <<< "$template5")" "$expect5" } |
