matze/wastebin

Link to a line should jump to that line

berezovskyi opened this issue · 1 comments

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!

matze commented

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