Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !8425

Merged
Created Dec 03, 2014 by Administrator@rootOwner11 of 11 tasks completed11/11 tasks

Replace highlight.js with rouge-fork rugments

  • Overview 48
  • Commits 3
  • Changes 34

Created by: rumpelsepp

A few day ago I have opened this issue here #8404 (closed). I am neither a ruby nor a rails pro but I have managed to create some kind of demo. It is not ready for merge. You could consider it as a proof of concept and for comparing the results between highlight.js and rouge

Again some explanations

  • highlight.js is really buggy in getting the correct synthax. The solution is guessing the language with taking the filename, shebang, ... into consideration.
  • pygments handles this very well but it is a python library
  • rouge is a highlighter in ruby which is compatible to pygments themes. It is able to do this kind of guessing, too.
  • f4b9a65c reactivates highlight.js language autodetection which is buggy by design.
  • look here for some more discussion: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/232#note_622601, #8404 (closed)

TODO

  • Blob
  • Blame
  • Wiki
  • Code Blocks
  • Snippets
  • Themes - find a better white and dark theme!
  • Check color definitions in themes again
  • Code Cleanup
  • Line number links
  • Line number colors
  • add new theme screenshots

Demo

Checkout my private Gitlab instance. I have included this pull request there already: https://gitlab.sevenbyte.org/u/stefan

Instructions for changing the theme without an account are here: https://github.com/gitlabhq/gitlabhq/pull/8425#issuecomment-67137852

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/rumpelsepp/rouge