Open anistark opened 7 months ago
Highlighting is done client-side in JS. It inserts some additional HTML around the words to highlight. The mermaid code is still in the HTML and the highlighter runs before mermaid.js. There's really not much we can do here.
@badboy any way to avoid it ? Like disable highlight in mermaid?
The highlighting is done in mdbook's JavaScript here: https://github.com/rust-lang/mdBook/blob/bd323fb930eaadff4e8ee3859b064731617fd875/src/theme/searcher/searcher.js#L298-L315
I don't know how it works. Maybe mark_exclude
can be a list of things?
It's always set to the empty list though, so you would either need to modify that file and deploy it or find a way to inject your own configuration before it runs.
Alternatively figure out a way for mermaid.js to run before the searcher.js does its job.
Mermaid diagram is failing on mdbook search.
How to reproduce:
Search anything on mdbook that matches the texts inside mermaid diagram. It fails with said message.
Possible keyword clashes between query param
highlight