Skip to content
Myr

Only trim CR and NF from the submitted expression

Before adoption: this commit came in with the history the project adopted, so no landing records it.

So the trailing space in the following case is respected. curl -XPOST localhost:6266 -d "change-prompt:$(date)> "

authored by Junegunn Choi · committed by Junegunn Choi · parent a7a771b · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/server.go+1 added-1 removed
95 unmodified lines
96 line++97 }9899 errorMessage := ""100 actions := parseSingleActionList(strings.TrimSpace(string(body)), func(message string) {100 actions := parseSingleActionList(strings.Trim(string(body), "\r\n"), func(message string) {101 errorMessage = message102 })103 if len(errorMessage) > 0 {104 return bad(errorMessage)
8 unmodified lines