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
  • Issues
  • #8404

Closed
Open
Created Nov 26, 2014 by Administrator@rootOwner

Buggy Synthax Highlighting

Created by: rumpelsepp

As everyone might have noticed the synthax highlighting in gitlab is really buggy. I tend to say that it is unusable most of the time because it highlights almost everything wrong. There has been a little discussion here: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/232#note_622601

The solution for this problem is guessing the programming language with considerations about the filename (maybe the MIME type as well). Such a featureset is covered by pygments and rouge. Unfortunately pygments is a python library. So I suggest using rouge as a replacement for highlight.js. Rouge has support for the redcarpet gem as well.

I decided to put this issue in the issue tracker rather than on feedback.gitlab.com. IMHO this is not feature request but a bug report with a suggestion how to solve it.

Links:

  • Documentation: http://www.rubydoc.info/gems/rouge
  • Github: https://github.com/jneen/rouge
  • As the CSS is compatible to pygments here are some themes: http://richleland.github.io/pygments-css/
Assignee
Assign to
Time tracking