diff --git a/runtime/syntax/syntax_converter.go b/runtime/syntax/syntax_converter.go index 5e446ac3..e9f4dac0 100644 --- a/runtime/syntax/syntax_converter.go +++ b/runtime/syntax/syntax_converter.go @@ -148,8 +148,8 @@ func generateFile(filetype, syntax, header string, rules []interface{}) string { output += fmt.Sprintf(" - %s: \"%s\"\n", rule.color, strings.Replace(strings.Replace(rule.regex, "\\", "\\\\", -1), "\"", "\\\"", -1)) } else if rule, ok := r.(MultiRule); ok { output += fmt.Sprintf(" - %s:\n", rule.color) - output += fmt.Sprintf(" start: \"%s\"\n", rule.start) - output += fmt.Sprintf(" end: \"%s\"\n", rule.end) + output += fmt.Sprintf(" start: \"%s\"\n", strings.Replace(strings.Replace(rule.start, "\\", "\\\\", -1), "\"", "\\\"", -1)) + output += fmt.Sprintf(" end: \"%s\"\n", strings.Replace(strings.Replace(rule.end, "\\", "\\\\", -1), "\"", "\\\"", -1)) output += fmt.Sprintf(" rules: []\n\n") } }