Highlight: support same background settings as e.g. box
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 56.1k
- Forks
- 1.7k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Description
Description
Currently, highlight only support extend to modify the shape of the background, which extends in all directions. It would be nice if it had the same options as box:
Use Case
Box is a rectangle and can't break over lines. Thus, highlighting long code like here on GitHub is not possible:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim aeque doleamus animo
This can be done with the highlight function, but it lacks the styling possibilities to make it really useful.
Another option would be to add this general styling of the background to the text function.
Contributor guide
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 comparing the highlight and box reference pages, especially the listed stroke, radius, inset, and outset parameters, and trace how highlight handles backgrounds across line breaks. Define how each option should behave for multi-line highlights and whether the API belongs on highlight or text; done means the chosen behavior is documented and works for the stated long-text use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100