diff.rs
diff.rs copied to clipboard
Implement anchors for jumping to code
Something like:
https://diff.rs/view/serde/1.0.100/files/src/main.rs#L66https://diff.rs/view/serde/1.0.100/files/src/main.rs#fn:main
Allows for creating permalink to functions/lines for viewing crates.
I pushed a commit that implements the first step in making this possible.
Still need to do more things:
- Make this work with single column view
- Automatically expand if anchor line is hidden
- Implement smooth scrolling (CSS scroll-behaviour: smooth)
- Implement scroll margin (CSS scroll-margin-top: 100px)
- Highlight anchor line
- Make line numbers clickable (link to anchor)