Upgrade to Rouge 2.0
What does this MR do?
This MR is a refactor of the HTMLGitlab formatter. The original was copy-pasted from the legacy HTML formatter and adapted to suit our needs. In particular, this MR:
- Strips dead code and unused options
- Factors out the "wrapping" into the places that care about it - Bonzai and the view helpers
- Uses the Rouge 2.0
token_lines
method to split tokens into lines, removing the custom code we used to do the same - Uses the now-public
span
method instead of re-implementing it ourselves - Removes options to not split into lines - the places where this feature wasn't being used are now using the plain
Formatters::HTML
instead of this class
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
- Compatibility with Rouge 2.0 and others going forward
What are the relevant issue numbers?
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Tests -
Added for this feature/bug -
All builds are passing
-
-
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together