Codeblock line highlighting #176
Replies: 2 comments 1 reply
-
It does not look that difficult to support. Our underlying code block highlighting library, PrismJS, does support this feature via a plugin. So, basically a matter of assessing the resources size increase and best syntax we could map from markdown to specify these line intervals. I believe it should at least follow that "print pages interval" syntax, which seems pretty intuitive and widely used. That is, |
Beta Was this translation helpful? Give feedback.
-
Line highlighting within code block components has been implemented and will be available in the next public release of Retype. Here are few samples demonstrating how to configure and a screen capture of each sample: Highlight a single line```js #2
``` Highlight a range of lines```js #2-5
``` Highlight several ranges```js #1-2,4-8
``` Highlight without line numbers```js !#1-2,4-8
``` Highlight using attribute syntax```js:highlight="1-2,4-8"
``` |
Beta Was this translation helpful? Give feedback.
-
Would be awesome to be able to highlight lines in a code block to call out specific lines.
thanks!
Beta Was this translation helpful? Give feedback.
All reactions