DEV Community

Zen
Zen

Posted on

Pug/Jade syntax highlighting di Dev

Waktu itu aku membuat postingan yang mengharuskan menggunakan Pug/Jade. Tapi sayangnya, nggak muncul syntax highlightnya:

Alt Text

Alt Text

Kemudian aku menanyakan di Githubnya Dev:

Comment for #6187

Thanks for the issue @mzaini30. We use Rouge for syntax highlighting, which does not yet have support for Pug/Jade (issue 1, issue 2).

I will close this issue for now, as it's dependent on upstream changes.

Lalu, ketika aku menjelajah issue Github, kutemukan bahwa bisa kita pakai syntax highlight untuk slim:

Comment for #273

@mynimi Just adding my 2 cents: slim syntax (http://slim-lang.com/) is pretty similar to jade, and rouge supports slim!

Jadi, hasilnya seperti ini:

.panel.panel-default
  .panel-heading Judul
  .panel-body Isi
Enter fullscreen mode Exit fullscreen mode

Top comments (0)