I'm trying to include examples of how to use rehype pretty code in my tutorial and when I want to highlight the characters you need to use to highlight a line then it does highlight those but it also highliths the lines, which is wrong
example markdown:
````md showLineNumbers{16} /{1}/#special /{3-4}/#special
```js showLineNumbers {1} {3-4}
function helloWorld() {
// this is a comment
let greeting = 'Hello World!'
console.log(greeting)
}
gives me this result:
correct part: it highlighted the {1} and {3-4} in the inner code block using my #special ID
wrong part: it also highlighted line 1 and then also line 3 to 4
expacted result: as {1} and {3-4} are inside of slashs (/) rehype should not consider them as "highlight this line" information
I'm trying to include examples of how to use rehype pretty code in my tutorial and when I want to highlight the characters you need to use to highlight a line then it does highlight those but it also highliths the lines, which is wrong
example markdown:
gives me this result:
correct part: it highlighted the
{1}
and{3-4}
in the inner code block using my#special
IDwrong part: it also highlighted line 1 and then also line 3 to 4
expacted result: as
{1}
and{3-4}
are inside of slashs (/
) rehype should not consider them as "highlight this line" information