From d0474bf735064d58e463ff0c166265f6827ebb68 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sun, 1 Aug 2021 02:13:40 -0700 Subject: [PATCH] leave plain docstring whitespace mostly intact --- sh/document | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/document b/sh/document index 6edc9bc..7db03e8 100644 --- a/sh/document +++ b/sh/document @@ -23,7 +23,7 @@ document2() { # split by the marker: local code="${line%%$d*}" docs="${line#*$d}" code="${code#${code%%[! ]*}}" # ltrim - docs="${docs#${docs%%[! ]*}}" # ltrim + docs="${docs# }" # ltrim a single space local s=' ' n='' # using a space to signify unset @@ -59,7 +59,7 @@ document2() { ;; *) - s="${docs#${docs%%[! ]*}}" # ltrim + s="$docs" # leave whitespace intact ;; esac