Skip to content

Line Highlighting partially broken #4248

Closed Answered by brc-dd
sharpchen asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah sorry I should've reworded my answer.

Your theme has different color or style for "comment" and "punctuation.definition.comment". This creates two different <span>s. Now the way those transformers are written, they only match the regex within same element. This function in shiki core needs to support separate elements - https://github.com/shikijs/shiki/blob/main/packages/transformers/src/utils.ts

with eva dark:


https://github.com/fisheva/Eva-Theme/blob/a90d1a6674271e03c585a0b37c787071e3f01f73/themes/Eva-Dark.json#L930 -- removing punctuation.definition.comment from this line will also work.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@sharpchen
Comment options

@brc-dd
Comment options

@sharpchen
Comment options

@brc-dd
Comment options

Answer selected by sharpchen
@sharpchen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants