Skip to content
Snippets Groups Projects

Add file line links

Merged gitlab-qa-bot requested to merge github/fork/riyad/add-file-line-links into master

Created by: riyad

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 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: dzaporozhets

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

    By Administrator on 2012-11-07T11:21:52 (imported from GitLab project)

    By Administrator on 2012-11-07T11:21:52 (imported from GitLab)

  • Created by: dzaporozhets

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

    By Administrator on 2012-11-07T11:36:17 (imported from GitLab project)

    By Administrator on 2012-11-07T11:36:17 (imported from GitLab)

  • Created by: riyad

    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. :(

    By Administrator on 2012-11-07T13:11:26 (imported from GitLab project)

    By Administrator on 2012-11-07T13:11:26 (imported from GitLab)

  • Created by: riyad

    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.

    By Administrator on 2012-11-10T00:19:31 (imported from GitLab project)

    By Administrator on 2012-11-10T00:19:31 (imported from GitLab)

  • Created by: riyad

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

    By Administrator on 2012-11-10T09:49:33 (imported from GitLab project)

    By Administrator on 2012-11-10T09:49:33 (imported from GitLab)

  • Created by: riyad

    Has anyone looked at this?

    By Administrator on 2012-11-13T15:21:19 (imported from GitLab project)

    By Administrator on 2012-11-13T15:21:19 (imported from GitLab)

  • Created by: dzaporozhets

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

    By Administrator on 2012-11-13T16:15:09 (imported from GitLab project)

    By Administrator on 2012-11-13T16:15:09 (imported from GitLab)

  • Created by: dzaporozhets

    nice. Thank you!

    By Administrator on 2012-11-16T11:46:40 (imported from GitLab project)

    By Administrator on 2012-11-16T11:46:40 (imported from GitLab)

Please register or sign in to reply
Loading