Feature request: Add html anchors to line numbers in file view
Closed this issue · 2 comments
GoogleCodeExporter commented
When posting gitiles file-view URL's into bug reports, it would be very nice to
be able to link to an html anchor for the exact line I'm interested in.
Something like:
https://gerrit.googlesource.com/gitiles/+/master/gitiles-war/src/main/webapp/WEB
-INF/web.xml#line20
Ideally, the html might look like this:
<li class="L9"><a name="line20"><a
href="#line20"><span>...</span></a></a><br></li>
The <a href="#line20"> is just to make it easy to right-click and "Copy link
address"
Original issue reported on code.google.com by szager@chromium.org
on 21 Feb 2014 at 10:12
- Merged into: #21
GoogleCodeExporter commented
I don't want to fork prettify.js, and eventually I want to move to CodeMirror.
But I think in the meantime it wouldn't be hard to do this by postprocessing
every <li> within the <pre class="prettyprint">. Not sure what the performance
impact would be (though considering we may already show a flash of unstyled
<pre> this may be ok).
Original comment by dborowitz@google.com
on 21 Feb 2014 at 10:15
GoogleCodeExporter commented
Original comment by sop@google.com
on 24 Jun 2015 at 5:41
- Changed state: Duplicate