DEV Community

loading...

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

Collapse
deammer profile image
Maxime • Edited

Does anyone know if dev.to supports highlighting lines of code or combining the diff highlighter with a language highlighter?

My use case is to draw attention to new or update lines of code when I write tutorials.

Something like this:

Javascript syntax highlighting

I know we can use diff but I can't find a way to combine that with code highlighting:

function hello() {
-  alert("Hello!");
+  alert("Hi!");
}
Enter fullscreen mode Exit fullscreen mode
Collapse
lanae_bk profile image
Lanae BK

I am also trying to figure out how to do this - did you ever find an answer?

Collapse
deammer profile image
Maxime

I didn't ☚ī¸