Skip to content

Upgrade to Rouge 2.0

jneen requested to merge feature.rouge-20 into master

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?

Merge request reports

Loading