line numbers in code block
jackmaessen
✭✭✭
hello,
I am using vanilla 2 and i enabled GeSHi for syntaxhighlighting. It all works fine but i do not see the linenumbers in the message when posted. It is enabled in GeSHi. I also tried google prettifier for syntaxing and the same problem: only highlighting but no line numbers.
How can i set the line numbers when users put a code block?
0
Comments
Welcome to the community!
It looks like GeSHi (and the plugin in this repo) supports line numbers out of the box. You need to add a line attribute to your 'pre' elements. Something like this:
Perfect! this does the job. I now use per example lang="php" and line="1" between the pre tags and it gives me a perfect block of code with the right higlighting and linenumbers for the specific language. Thank you very much