DEV Community

Discussion on: How to add code highlighting to your Dev.to posts.

Collapse
 
rhymes profile image
rhymes

I did a quick search in the code: dev.to uses the Redcarpet Ruby library to parse Markdown with rouge which does the highlighting part.

The list of lexers is impressive:

Dart:

void main() {
  print('Hello, World!');
}
Enter fullscreen mode Exit fullscreen mode

Julia:

println("hello world")
Enter fullscreen mode Exit fullscreen mode

No Cobol though :D

You can find the code in devto here and here and here

Collapse
 
kishorjena profile image
Kishor Jena

Can you tell me the name of the theme for JS. I hope this available in vscode.