Only trim CR and NF from the submitted expression

So the trailing space in the following case is respected.

  curl -XPOST localhost:6266 -d "change-prompt:$(date)> "
pull/3097/head^2
Junegunn Choi 1 year ago
parent a7a771b92b
commit cf69b836ac

@ -97,7 +97,7 @@ func handleHttpRequest(conn net.Conn, channel chan []*action) string {
}
errorMessage := ""
actions := parseSingleActionList(strings.TrimSpace(string(body)), func(message string) {
actions := parseSingleActionList(strings.Trim(string(body), "\r\n"), func(message string) {
errorMessage = message
})
if len(errorMessage) > 0 {

Loading…
Cancel
Save