Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add html anchors to line numbers in file view #41

Closed
GoogleCodeExporter opened this issue Nov 17, 2015 · 2 comments
Closed

Comments

@GoogleCodeExporter
Copy link

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

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

Original comment by sop@google.com on 24 Jun 2015 at 5:41

  • Changed state: Duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant