diff --git a/internal/parser/diff/meta.go b/internal/parser/diff/meta.go index cd7ea42..2891d20 100644 --- a/internal/parser/diff/meta.go +++ b/internal/parser/diff/meta.go @@ -8,8 +8,8 @@ import "github.com/joint-online-judge/JOJ3/internal/stage" var name = "diff" type Conf struct { - PassComment string `default:"🥳Passed!\n"` - FailComment string `default:"🧐Failed...\n"` + PassComment string `default:"🥳Passed!"` + FailComment string `default:"🧐Failed..."` FailOnNotAccepted bool `default:"true"` ForceQuitOnFailed bool `default:"false"` Cases []struct { diff --git a/internal/parser/diff/parser.go b/internal/parser/diff/parser.go index be08ff5..78fc468 100644 --- a/internal/parser/diff/parser.go +++ b/internal/parser/diff/parser.go @@ -31,7 +31,7 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) ( if conf.ForceQuitOnFailed { forceQuit = true } - comment += conf.FailComment + comment += conf.FailComment + "\n" comment += "Executor status not `Accepted`\n" } else { for _, output := range caseConf.Outputs { @@ -58,12 +58,12 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) ( // If no difference, assign score if isSame { score += output.Score - comment += conf.PassComment + comment += conf.PassComment + "\n" } else { if output.ForceQuitOnDiff || conf.ForceQuitOnFailed { forceQuit = true } - comment += conf.FailComment + comment += conf.FailComment + "\n" comment += fmt.Sprintf("Difference found in `%s`\n", output.FileName) if !output.AlwaysHide {