diff --git a/cf.go b/cf.go index fa4b3978..772e9159 100644 --- a/cf.go +++ b/cf.go @@ -103,7 +103,7 @@ Options: -h --help --version` - args, _ := docopt.Parse(usage, nil, true, "Codeforces Tool (cf) v0.3.4", false) + args, _ := docopt.Parse(usage, nil, true, "Codeforces Tool (cf) v0.3.5", false) color.Output = ansi.NewAnsiStdout() config.Init() err := cmd.Eval(args) diff --git a/client/parse.go b/client/parse.go index c92b0fd8..8929de30 100644 --- a/client/parse.go +++ b/client/parse.go @@ -26,7 +26,7 @@ func findSample(body []byte) (input [][]byte, output [][]byte, err error) { filter := func(src []byte) []byte { src = newline.ReplaceAll(src, []byte("\n")) s := html.UnescapeString(string(src)) - return []byte(strings.TrimSpace(s)) + return []byte(strings.TrimSpace(s) + "\n") } for i := 0; i < len(a); i++ { input = append(input, filter(a[i][1]))