Closed GoogleCodeExporter closed 8 years ago
Does http://google-code-prettify.googlecode.com/svn/trunk/README.html#linenums
not work for you?
If you do use line numbering, you can always style a particular line by doing
something like
#my-code-block li:nth-child(50) { background: yellow }
in modern browsers.
Original comment by mikesamuel@gmail.com
on 7 Jan 2011 at 9:19
Closing for lack of response.
Original comment by mikesamuel@gmail.com
on 4 Mar 2011 at 8:26
[deleted comment]
This issue has not been fixed. I would also like this feature being implemented
in google-code-prettify instead of needing to have another css code.
Original comment by c.w.t...@gmail.com
on 22 May 2014 at 9:27
I would also like this feature.
@mikesamuel, using nth-child(50) like your example will highlight the 50th
line. But if we use "linenums:17" to highlight the 50th line on the code we
need to use nth-child(33) because of the offset and I need a calculator to make
50-17=33 :-)
Original comment by claudio....@gmail.com
on 30 Jan 2015 at 4:03
You don't need CSS at all to do this.
<pre clas="prettyprint">Line 1
<span class="highlighted">Line 2</span>
Line 3</pre>
should work just fine since prettify preserves tags in the input.
Original comment by mikesamuel@gmail.com
on 31 Jan 2015 at 10:01
Original issue reported on code.google.com by
serg472@gmail.com
on 23 Dec 2010 at 10:41