Line highlight doesn't line up when a line above text wraps
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13k
- Forks
- 1.4k
- Avg merge
- 15h 36m
- Merged PRs (30d)
- 3
Description
Information
- Language: doesn't matter
- Plugins: line highlight is the issue but see below
/* PrismJS 1.28.0
https://prismjs.com/download.html#themes=prism-tomorrow&languages=clike+javascript+python&plugins=line-highlight+line-numbers+autolinker+show-language+autoloader+toolbar+copy-to-clipboard+download-button+match-braces */
Description
I have the line highlight plugin to emphasize some lines on my website. However, when I view it in mobile the lines text wrap (intentionally) and mess up the alignment on the line highlight boxes.
mobile view:
wider view (no text wrapping = correct lines get highlighted):
(for reference, the page is: https://dragoncoder047.github.io/pages/ulisp_howto/macros.html)
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
Reproduce the issue on the linked ulisp_howto/macros.html page at a narrow mobile width, using the line-highlight plugin with wrapped code. Start by inspecting the line-highlight plugin and compare its positions before and after a line above wraps. Done means highlighted boxes remain aligned with their intended lines at both narrow and wide widths, with a regression test if the existing test setup supports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100