Line-Highlight Vertical Centering Option
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13k
- Forks
- 1.4k
- Avg merge
- 15h 36m
- Merged PRs (30d)
- 3
Description
Right now, the line-highlight plugin uses scrollIntoView() to cause the highlighted lines to appear at the top, when the page is loaded using the hash syntax. It would be useful if there were an option to have the lines be vertically centered instead, to provide context on both sides of the highlighted lines. I tried hacking that in myself, but my JavaScript-fu is weak...
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the line-highlight plugin's hash-loading path, especially where scrollIntoView() positions highlighted lines. Define the option's expected behavior there and verify that hash-based highlighting can position the lines vertically centered while preserving the existing default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100