Canonicalize line endings for text messages (#86)
* Canonicalize line endings for text messages * Improve cleartext messages
This commit is contained in:
parent
a4d89bce32
commit
ce607e0fa8
6 changed files with 25 additions and 25 deletions
|
|
@ -7,9 +7,9 @@ import (
|
|||
"github.com/ProtonMail/gopenpgp/v2/constants"
|
||||
)
|
||||
|
||||
// TrimNewlines removes whitespace from the end of each line of the input
|
||||
// TrimWhitespace removes whitespace from the end of each line of the input
|
||||
// string.
|
||||
func TrimNewlines(input string) string {
|
||||
func TrimWhitespace(input string) string {
|
||||
var re = regexp.MustCompile(`(?m)[ \t]*$`)
|
||||
return re.ReplaceAllString(input, "")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue