ZhouShuo / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

Line numbers on each line #164

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Very simple feature request. I would like to be able to have line numbers 
printed on each line, instead of just each fifth line.

Otherwise thanks for an awesome library!

- Egil

Original issue reported on code.google.com by e...@assimilated.dk on 28 Jul 2011 at 3:02

GoogleCodeExporter commented 9 years ago
You can do this in CSS.  Simply remove the lines below from prettify.css

li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 { list-style-type: none }

Original comment by mikesamuel@gmail.com on 3 Aug 2011 at 2:28

GoogleCodeExporter commented 9 years ago
yeah, but u should add a claa for pre tag, like:

<pre class="prettyprint linenums>

the linenums means line numbers before the coding. BTW, I reset the "li" style 
in the reset.css file, finally, I add "padding-left:30px" for ol.linenums in 
the desert.css.

Original comment by 107ba...@gmail.com on 24 Aug 2011 at 9:49

GoogleCodeExporter commented 9 years ago
I agree: A separate CSS class for numbering each line would be nice. Then you 
can switch styles within the same HTML file.

Original comment by rausc...@gmail.com on 20 Dec 2011 at 11:44

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r211.

Original comment by mikesamuel@gmail.com on 30 Mar 2012 at 6:24

GoogleCodeExporter commented 9 years ago
Not fixed.  That change fixes issue 168.

Original comment by mikesamuel@gmail.com on 30 Mar 2012 at 6:26