-
I was wondering if there is an easy way to do the mkdocs-style highlights for code fences with annotators or similar, that is to do something like this: ```lang hl_lines="1 3 6-7"
line 1 is higlighted
line 2 is not
line 3 is highlighted
line 4 not
line 5 not
line 6 is highlighted
line 7 is highlighted
line 8 is not
``` My current attempt to do that is to parse the While it works, it really doesn't look elegant, architecturally. Is there a better way to do something that? I was looking for a similar discussion or an open issue, but haven't found one, so maybe I am missing something obvious. If so, please simply delete the question. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
that's the way (if you are talking about inserting them in the it's totally fine to do something like: const highlighted = await highlight(code, theme)
highlighted.annotations.push(something) |
Beta Was this translation helpful? Give feedback.
that's the way (if you are talking about inserting them in the
annotations
array)it's totally fine to do something like: