| ... | @@ -38,9 +38,8 @@ pub fn fileSourceLineNumbersHtml( | ... | @@ -38,9 +38,8 @@ pub fn fileSourceLineNumbersHtml( |
| 38 | const ast = file_index.get_ast(); | 38 | const ast = file_index.get_ast(); |
| 39 | const first_token_line = ast.tokenLocation(0, ast.firstToken(root_node)).line; | 39 | const first_token_line = ast.tokenLocation(0, ast.firstToken(root_node)).line; |
| 40 | const last_token_line = ast.tokenLocation(0, ast.lastToken(root_node)).line; | 40 | const last_token_line = ast.tokenLocation(0, ast.lastToken(root_node)).line; |
| 41 | const writer = out.writer(gpa); | | |
| 42 | for (first_token_line..last_token_line + 1) |i| { | 41 | for (first_token_line..last_token_line + 1) |i| { |
| 43 | try std.fmt.format(writer, "<span>{d}</span>\n", .{i + 1}); | 42 | try out.print(gpa, "<span>{d}</span>\n", .{i + 1}); |
| 44 | } | 43 | } |
| 45 | } | 44 | } |
| 46 | | 45 | |