scrivo / highlight.php

A port of highlight.js by Ivan Sagalaev to PHP
BSD 3-Clause "New" or "Revised" License
695 stars 45 forks source link

Display more than 1 code block #108

Open AnonDev1312 opened 1 year ago

AnonDev1312 commented 1 year ago

What is the correct way to display more than 1 code block?

If I try to use Highlighter on multiple code blocks on the same page, only the last one will get the CSS style.

I think this is because the element ID jsonFormatterParsed is re-used by multiple elements, but I can't find how to use a different ID

thanks

S1SYPHOS commented 1 year ago

Could you provide a code example?