shikijs / shiki

A beautiful yet powerful syntax highlighter
http://shiki.style/
MIT License
10.19k stars 374 forks source link

`highlight-word-range`: selected which selected words to highlight #632

Open spcbfr opened 7 months ago

spcbfr commented 7 months ago

Clear and concise description of the problem

I want to be able to do /myWord/2-4 and the transformer should highlight the 2nd, 3rd and 4th occurrences of myWord only

Suggested solution

after inputting the word like so /myWord/ the user could simply add a range to work with. the range is optional though

Alternative

No response

Additional context

No response

Validations

Contributes

fuma-nama commented 2 months ago

I think counting by occurrences isn't as intuitive as specifying line numbers.

Why don't use the range syntax: [!code word:Hello:1] instead?