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

Handle marked lines in urls #261

Closed
Sohalt opened this issue Jul 21, 2015 · 4 comments
Closed

Handle marked lines in urls #261

Sohalt opened this issue Jul 21, 2015 · 4 comments

Comments

@Sohalt
Copy link

Sohalt commented Jul 21, 2015

Github supports marking code sections when sharing a link to a file. This is very useful when talking about a specific part of the code and you want other to immediately find that part. It would be great if octodroid supported this feature and correctly marked the specified lines.

@maniac103
Copy link
Collaborator

Can you give an example of such an URL?

@Sohalt
Copy link
Author

Sohalt commented Jul 22, 2015

Oh, sorry of course. Should've done that in the description right away.
Example: https://github.com/slapperwan/gh4a/blob/39d9a30cfb6229fb1d514600211ef31d1b485e86/src/com/gh4a/Gh4Application.java#L49-51 (the#Ln-m part where n and m are line numbers. Also works for single lines with #Ln where n is the line number. It appears to only work when the commit is specified in the URL, so the line numbers have a consistent meaning)

@maniac103
Copy link
Collaborator

Ah, OK. I only knew the #Ln syntax so far and thought of it as kind of a jump-to mark.
I'll see whether it's possible to do this with some CSS hackery.

@maniac103
Copy link
Collaborator

Just for testing:

import com.gh4a.fragment.SettingsFragment;

maniac103 added a commit that referenced this issue Aug 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants