1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 03:29:02 -08:00

leave plain docstring whitespace mostly intact

This commit is contained in:
Connor Olding 2021-08-01 02:13:40 -07:00
parent db0b029d0f
commit d0474bf735

View file

@ -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