From 5afba1190d2eff1f621906dc7933133c482db58c Mon Sep 17 00:00:00 2001 From: Nils Date: Tue, 30 Jun 2020 18:35:32 +0100 Subject: [PATCH] Prevent `read` from trimming whitespace, resulting in broken indentation https://mywiki.wooledge.org/IFS --- internal/globals.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/globals.sh b/internal/globals.sh index 1c9532e..7a608ce 100644 --- a/internal/globals.sh +++ b/internal/globals.sh @@ -503,7 +503,7 @@ function post_markdown { cat "${TMP2}" > "${TMP1}" else HEADINGS=( ) - while read LINE + while IFS= read -r LINE do if [[ "$(echo "${LINE}" | grep "^.*" )" == "" ]] then