Skip to content

Add the highlightJS dependency

Jacques Erasmus requested to merge 345806-add-highlight-js into master

What does this MR do and why?

As part of bigger efforts to refactor the blob viewers and Highlight source code syntax on the frontend using HighlightJS this adds the Highlight.js dependency to the frontend.

Note: There is a vue-plugin for highlight.js that supports Vue 2 but the plugin depends on an older version of highlight.js. I'd rather have us build our own Vue wrapper that uses the latest version of highlight.js.

Here is what we plan to deliver during this milestone behind the highlight_js feature flag:

task MR
Add the highlight.js dependency this MR
Configure highlight.js dependency on the blob text viewer follow-up
Ensure highlighted source files matches one of the GitLab themes (white) follow-up

Screenshots or screen recordings

N/A

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #345806 (closed)

Edited by Jacques Erasmus

Merge request reports

Loading