Open davidegurgone opened 3 years ago
After some search I finally found the trick: The library renders code in this way:
<pre><code class="language-java">String foo="BAR";
for (int i=0; i<10; 1++) {
System.out.println(foo + i);
}
</code></pre>
language-java is used by PrismJS client side library to syntax highlight the code in the browser.
Hi @davidegurgone, thanks for the kind words.
Generated html contains language in class indeed (source), there is no default way to highlight it. IntelliJ IDEA, for example, uses own syntax highlighting engine for highlighting code blocks in preview. I think using PrismJS is a good choice!
Hi, thanks for this precious job!
I am trying to integrate this library for formatting code documentation, how did you integrate syntax highlighting? There is an extension for that?
Thanks a lot, Davide.