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
  • #6960

Closed
Open
Created 11 years ago by Administrator@rootOwner
  • New issue

  • Report abuse

  • New issue

  • Report abuse

Unwanted syntax highlighting

Closed

Unwanted syntax highlighting

Created by: fenhl

The docs say:

Only the fenced code blocks support syntax highlighting.

However, as you can see on this wiki page, which uses indented code blocks, this is not true. This is especially jarring for this project, since it is a language.

The project's license is also being highlit, even though it is a plain text file with no extension.

I think syntax highlighting should only be applied to files with an appropriate extension, or, within markdown, fenced code blocks with a language annotation.

Linked issues
...


    • Administrator
      Administrator @root · 10 years ago
      Owner

      Created by: Razer6

      Is this still an issue?

      By Administrator on 2014-07-19T22:12:02 (imported from GitLab project)

    • Administrator
      Administrator @root · 10 years ago
      Owner

      Created by: jvstein

      Yes, it's still a problem on wiki pages. Even the help documentation has highlighting in the example that says it shouldn't.

      https://gitlab.com/help/markdown/markdown#code-and-syntax-highlighting

      By Administrator on 2014-07-20T00:24:19 (imported from GitLab project)

    • Administrator
      Administrator @root · 10 years ago
      Owner

      Created by: Rufflewind

      It's still an issue. The only workaround is to use fenced code-blocks all the time with no-highlight. According to this issue and also the highlight.js docs, this can be disabled using:

      hljs.configure({languages: []});

      By Administrator on 2014-11-10T23:25:50 (imported from GitLab project)

    • Administrator
      Administrator @root · 10 years ago
      Owner

      Created by: Razer6

      This is fixed by https://github.com/gitlabhq/gitlabhq/pull/8425

      By Administrator on 2015-01-22T07:21:27 (imported from GitLab project)

    • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
    Please register or sign in to reply
    0 Assignees
    Assign to
    Milestone
    No milestone
    None
    None
    Time tracking
    Due date
    None
    None
    1
    Labels
    Awaiting feedback
    Assign labels
    • No matching results
    • Manage project labels
    Confidentiality
    Not confidential

    You are going to turn on confidentiality. Only team members with at least Reporter access will be able to see and leave comments on the issue.

    Lock issue
    Unlocked
    participants
    Reference: