[go: up one dir, main page]

Skip to content

Docs: Need to clarify syntax highlighting documentation

  • Start this issue's title with Docs: or Docs feedback:.

Problem to solve

User documentation on syntax highlighting in GitLab is confusing and contradictory.

If I understand correctly, syntax highlighting applies to the following:

  • Viewing files in a repository (in the GitLab UI).
  • Editing a file in the Web Editor.
  • Editing a file in the Web IDE.
  • Viewing a snippet.
  • Editing a snippet.

The syntax highlighting documentation states the following:

GitLab provides syntax highlighting on all files through Highlight.js and the Rouge Ruby gem. It attempts to guess what language to use based on the file extension, which most of the time is sufficient.

The Web IDE and Snippets use Monaco Editor for text editing, which internally uses the Monarch library for syntax highlighting.

From my testing in GitLab is that the syntax highlighting theme selected in the user profile applies to all the above UI elements except for the Web IDE. There are some noticeable differences between the appearance of these elements and I don't understand why.

Objectives:

  • Confirm which UI elements uses the syntax highlighting theme selected in the user profile.
  • Update the user documentation.

Further details

With syntax theme "Solarized Dark" selected in my profile, the following UI elements look as follows.

Viewing a JavaScript snippet

image

Editing a JavaScript snippet

image

Viewing a JavaScript file in a repository

image

Editing the (same) JavaScript file in the Web Editor

image

Proposal

Who can address the issue

Other links/references

This issue was discovered while working on Improve UI text for syntax theme selection (!179316 - merged).

Edited by Russell Dickenson