[GH-ISSUE #30] Link to a line should jump to that line #27

Closed
opened 2026-02-27 10:15:21 +03:00 by kerem · 1 comment
Owner

Originally created by @berezovskyi on GitHub (Jun 25, 2023).
Original GitHub issue: https://github.com/matze/wastebin/issues/30

Via https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#linking_to_an_element_on_the_same_page, an id could be added to every row in https://github.com/matze/wastebin/blob/master/src/highlight.rs#L99 (should be let line = format!(r#"<td class="line" id="L{line_number}">{formatted_str}"#);)

P.S. Thanks for a nice project!

Originally created by @berezovskyi on GitHub (Jun 25, 2023). Original GitHub issue: https://github.com/matze/wastebin/issues/30 Via https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#linking_to_an_element_on_the_same_page, an `id` could be added to every row in https://github.com/matze/wastebin/blob/master/src/highlight.rs#L99 (should be `let line = format!(r#"<td class="line" id="L{line_number}">{formatted_str}"#);`) P.S. Thanks for a nice project!
kerem closed this issue 2026-02-27 10:15:21 +03:00
Author
Owner

@matze commented on GitHub (Jun 26, 2023):

Indeed that was the point why the line numbers are links in the first place 🙈, thanks for pointing that out!

<!-- gh-comment-id:1606861224 --> @matze commented on GitHub (Jun 26, 2023): Indeed that was the point why the line numbers are links in the first place :see_no_evil:, thanks for pointing that out!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wastebin-matze#27
No description provided.