diff --git a/main.go b/main.go index 51eb452..5987f54 100644 --- a/main.go +++ b/main.go @@ -57,6 +57,9 @@ func processCommand(plugin Plugin, command string) error { } if command[0] == 't' { text := command[1:] + // normalize line endings + text = strings.Replace(text, "\r\n", "\n", -1) + text = strings.Replace(text, "\r", "\n", -1) if !utf8.ValidString(text) { return errors.New("invalid utf-8") }