Upgrade lowlight dependency
What does this MR do and why?
This MR upgrades the lowlight dependency used by the Content Editor to highlight code blocks.
What is lowlight?
lowlight is a wrapper around the highlight.js library that allows applying syntax highlighting to VirtualDOM elements. It is really useful to highlight content that is not attached to the page yet.
Why is this upgrade useful?
GitLab uses highlight.js in other features to highlight code. The highlight.js version used by GitLab is 11.x while the lowlight
version used by the Content Editor uses highlight 10.x. As a result, we are loading two major versions of highlight.js which implies a lot of useless javascript.
Upgrading to lowlight 2.x allows us to consolidate all highlight.js versions in our codebase!
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
We just need to ensure that code blocks are correct highlighted in the Content Editor. You can do this by editing a Wiki page and creating code blocks for different languages like this:
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.