| ... | @@ -990,9 +990,15 @@ fn tokenizeAndPrintRaw( | ... | @@ -990,9 +990,15 @@ fn tokenizeAndPrintRaw( |
| 990 | }, | 990 | }, |
| 991 | | 991 | |
| 992 | .multiline_string_literal_line => { | 992 | .multiline_string_literal_line => { |
| 993 | try out.writeAll("<span class=\"tok-str\">"); | 993 | if (src[token.loc.end - 1] == '\n') { |
| 994 | try writeEscaped(out, src[token.loc.start .. token.loc.end - 1]); | 994 | try out.writeAll("<span class=\"tok-str\">"); |
| 995 | try out.writeAll("</span>" ++ end_line ++ "\n" ++ start_line); | 995 | try writeEscaped(out, src[token.loc.start .. token.loc.end - 1]); |
| | 996 | try out.writeAll("</span>" ++ end_line ++ "\n" ++ start_line); |
| | 997 | } else { |
| | 998 | try out.writeAll("<span class=\"tok-str\">"); |
| | 999 | try writeEscaped(out, src[token.loc.start..token.loc.end]); |
| | 1000 | try out.writeAll("</span>"); |
| | 1001 | } |
| 996 | }, | 1002 | }, |
| 997 | | 1003 | |
| 998 | .builtin => { | 1004 | .builtin => { |