Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix highlighting when hljs=true #171
Could you show an example such case ?
Certainly, the existing code seems something strange.
I don't know the reason why this
Can you explain ?
The API document of
According to above API document,
Please refer to issue #164.
Thanks for the response. I thought it cannot highlight multi-line block, but it turns out that, it simply cannot highlight certain multi-line block (bug report at highlightjs/highlight.js#2339):
After commenting out the if statement, it switches to per-line highlighting and works.
What do you think?
Still, I think the if-statement should be removed because there is no reason to use different logic to highlight code.
Or, an alternative to make highlighting more robust is to use
I'm sorry, I'm too late.
I think @ppwwyyxx 's proposal will be better than current implementation.
Maybe the 2nd choice never fail.
In any case, the language name should be set as an HTML class name.