DEV Community

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

deammer profile image
Maxime • Edited

Does anyone know if 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
lanae_bk profile image
Lanae BK

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

deammer profile image

I didn't ☚ī¸