Add file line links #1937

Merged
merged 3 commits into from Nov 16, 2012

Projects

None yet

2 participants

@riyad
Contributor
riyad commented Nov 7, 2012

Allows linking to specific lines in files.

  • Line numbers on file content pages are links now
  • Appending "#L12" or "#L12-34" to a file URL will highlight those lines

Depends on gitlabhq/pygments.rb#1

Closes #738

Owner
randx commented Nov 7, 2012

Wrap all content lines in text files wont work when navigating via ajax

Owner
randx commented Nov 7, 2012

I made a commit with line anchors only - 10d881c. I authored it with you cause I take code from this PR if you dont mind

Contributor
riyad commented Nov 7, 2012

I'll look into it and update the PR, because without this highlighting the lines won't work.
There is the hl_lines option in Pygments, but you have no access to URL anchors on the server side. :(

@riyad riyad referenced this pull request in gitlabhq/pygments.rb Nov 9, 2012
Merged

Add GitLab specific formatter #1

riyad added some commits Nov 6, 2012
@riyad riyad Add jQuery.ScrollTo 45dcb1b
@riyad riyad Allow linking to file lines
Supported formats: "L12" for single lines and "L12-34" for multiple lines
c42ada9
Contributor
riyad commented Nov 9, 2012

Rebased and updated. It doesn't rewrite the whole text any more. Also JS and CSS are much saner now. ;)
But it depends on a custom Pygments formatter for GitLab (see gitlabhq/pygments.rb#1)
Note: The Gemfile points to my pygments.rb fork at the moment. The Gemfile needs to be updated to GitLab's fork once the PR is accepted.

@riyad riyad referenced this pull request Nov 9, 2012
Closed

Bump pygments.rb to 0.3.2 #1966

Contributor
riyad commented Nov 10, 2012

Updated to use GitLab's fork of pygments.rb.

Contributor
riyad commented Nov 13, 2012

Has anyone looked at this?

Owner
randx commented Nov 13, 2012

@riyad I'll take a look tomorrow :)
A bit busy with https://github.com/gitlabhq/gitlab-ci today

Owner
randx commented Nov 16, 2012

nice. Thank you!

@randx randx merged commit b339c74 into gitlabhq:master Nov 16, 2012

1 check passed

default The Travis build passed
Details
@randx randx added a commit that referenced this pull request Mar 29, 2015
@randx randx Merge branch 'remove_external_trackers_from_yml' into 'master'
We've moved external trackers to service, remove from gitlab.yml.

Fixes #1937

See merge request !1743
0154338
@bluegod bluegod pushed a commit that referenced this pull request Feb 27, 2017
@rymai rymai Merge branch '1937-https-clone-url-username' into 'master'
Add the username of the current user to the HTTP(S) clone URL

Closes #1937

See merge request !9347
c425f36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment