👋 Hey Titus!
I'm using lowlight and noticed something unusual - if I rely on highlightAuto, the behavior is that, if none of the listed languages have any relevance reported here:
Then the fallback behavior is to output nothing:
|
return ( |
|
result || { |
|
type: 'root', |
|
children: [], |
|
data: {language: undefined, relevance} |
|
} |
|
) |
This is pretty different behavior than highlight.js's automode, in which plaintext is always included as an option:
https://github.com/highlightjs/highlight.js/blob/main/src/highlight.js#L687
That behavior would be ideal - the 'empty' result here isn't all that easy to detect, and it's not super clean to generate the plaintext highlighted result myself.