mirror of
https://github.com/ziglang/zig.git
synced 2025-02-08 21:50:33 +00:00
wasm zig source rendering: fix annotation location off-by-one
This commit is contained in:
parent
1484f174ea
commit
5f5a7b53a4
@ -91,7 +91,7 @@ pub fn fileSourceHtml(
|
||||
while (true) {
|
||||
if (next_annotate_index >= options.source_location_annotations.len) break;
|
||||
const next_annotation = options.source_location_annotations[next_annotate_index];
|
||||
if (cursor < next_annotation.file_byte_offset) break;
|
||||
if (cursor <= next_annotation.file_byte_offset) break;
|
||||
try out.writer(gpa).print("<span id=\"{s}{d}\"></span>", .{
|
||||
options.annotation_prefix, next_annotation.dom_id,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user