diff --git a/marsh b/marsh index 73ef2b68..0bd21042 100755 --- a/marsh +++ b/marsh @@ -1,12 +1,12 @@ #!/bin/bash # marsh - build static websites using markdown and bash # -# Copyright 2021 Bradley Sepos +# Copyright 2022 Bradley Sepos # Released under the MIT License. See LICENSE for details. # https://github.com/bradleysepos/marsh NAME="marsh" -VERSION="0.8.1" +VERSION="0.8.2" SELF="${BASH_SOURCE[0]}" SELF_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd -P) SELF_DIR="${SELF_DIR:-$(pwd)}" @@ -1724,7 +1724,7 @@ function build_document { # build_document dest_dir target_dir document advance # process images with multiple resolution assets cp "${DOCUMENT}.${MARSH_UID}.document" "${DOCUMENT}.${MARSH_UID}.document.temp" <"${DOCUMENT}.${MARSH_UID}.document.temp" sed -E \ - -e 's|^!\[(.+)]\([ ]*([^ ]+)[ ]*"(.+)"[ ]*\)$|
\1
\3
|' | + -e 's|^!\[(.+)]\([ ]*([^ ]+)[ ]*"(.+)"[ ]*\)$|
\n\n\1\n\n
\3
\n
|' | process_markdown | sed -E \ -e 's|

|
|' \ @@ -1758,11 +1758,15 @@ function build_document { # build_document dest_dir target_dir document advance } else { f3=""; } - print "src=\"" f "\" srcset=\"" f1 f2 f3 "\" "; - } else { - print a[i]; + a[i] = "src=\"" f "\" srcset=\"" f1 f2 f3 "\""; } + if (i > 1) + { + printf " "; + } + printf "%s", a[i]; } + printf "\n"; } else { print $0; }