Comments (2)
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.
from markdown.
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!
from markdown.
Related Issues (20)
- Nested blockquotes cannot end early.
- Support for Alerts
- Segfault when running native release executables HOT 5
- Incorrect HtmlBlockMarkerBlock token detection
- Support checklist syntax for github flavour
- Add math support HOT 1
- Table values are shifted in Markdown preview
- Enhancement: Expand commands that can be run from markdown
- Everything behind the html tag is parsed as text on windows
- support incremental parsing with streams
- WASM support
- Add support for cancellation of the parsing process
- All URLs starting with file: are parsed into hashtags. .
- GFM Support (PLEASE) HOT 3
- GFM Tables don't seem to tokenize column alignment
- Support for target `linuxArm64`
- Undesirable behaviour with carriage return. HOT 2
- Code Spans with ` are incorrectly trimmed HOT 2
- Maven Central Sync of 0.7.0 release HOT 1
- Impossible to expand HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdown.