Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
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:
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
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