Archived topic
adding line numbers with
7 replies · Started by Halil on November 24, 2017
I am not sure this has anything to do with gp but I am unable to add line numbers to code lines by using below tags.
some code
I know by default there is no line numbering with above code but I have tried almost every syntax highlighter plugin without a success. Interestingly nothing happens. When I try basic themes they work but now with gp (I am using child theme).
Do u have any idea about this?
Hi there,
I'm not sure what you mean?
Can you provide an example?
sure. I am trying to add line numbers to code part u see on this page https://powerbi.istanbul/pbi-swissknife/
I have used <pre> and <code> tags for this. (The code start with something like = DIVIDE ..)
Tried many highlighter plugins (like this one http://alexgorbatchev.com/SyntaxHighlighter/ ), none of them are working. When I switch to tweenty themes they are working, but not with my gp child theme.
Can you link me to a page where you've done this?
I just tested both <pre> and <code> and both of them worked on the test page.
I didnt say pre and code tags are not working. I am saying, I am not able to add LINE NUMBERS to my codes with any plugin I tried. When I switch to tweenty theme, I am able to do this with below plugin (for example)
http://alexgorbatchev.com/SyntaxHighlighter/ See line numbers at the beginning of each line. This is something I am not able to add with gp.
Hmm, there shouldn't be any difference between GP and any other theme in this respect.
Can you link me to a page where it's not working in GP?
https://powerbi.istanbul/highlight-test/
it may not be related with gp or child theme of gp. I am not sure.
the plugin is http://alexgorbatchev.com/SyntaxHighlighter/ seems popular, but not sure about it either.
is it possible thru css? I mean numbering lines of codes.
It looks like Syntax Highlighter requires jQuery, and you have a jQuery not defined error.
Perhaps try excluding jquery.js from your caching/minifying plugin.