Skip to content

Commit ddfbac2

Browse files
committed
wasm zig source rendering: fix annotation location off-by-one
1 parent f9da442 commit ddfbac2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/docs/wasm/html_render.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub fn fileSourceHtml(
9191
while (true) {
9292
if (next_annotate_index >= options.source_location_annotations.len) break;
9393
const next_annotation = options.source_location_annotations[next_annotate_index];
94-
if (cursor < next_annotation.file_byte_offset) break;
94+
if (cursor <= next_annotation.file_byte_offset) break;
9595
try out.writer(gpa).print("<span id=\"{s}{d}\"></span>", .{
9696
options.annotation_prefix, next_annotation.dom_id,
9797
});

0 commit comments

Comments
 (0)