Skip to content

Resolve "Enable code highlighting for Jupyter Diffs"

What does this MR do and why?

Describe in detail what your merge request does and why.

With !71477 (merged) we added better diff experience for Jupyter Notebooks by transforming them into markdown first, but we were not highlighting the code.

NOTE: Since this is part of a larger feature (!71477 (merged)) we are not adding a changelog on this MR.

Screenshots or screen recordings

Before:

image

After:

image

How to set up and validate locally

  1. Clone the repository: https://gitlab.com/gitlab-org/incubation-engineering/mlops/ipynb-test-projects/diff-sample into your local gdk installation

  2. Enable the feature locally only for the created project

    Feature.enable(:jupyter_clean_diffs)
  3. Open http://gdk.test:3000/root/diff_test/-/commit/542d42a0196e2e94a0d5793acdee5ba997ab12bf

  4. The diff should display as shown the after screenshot above

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 #344903 (closed)

Edited by Eduardo Bonet

Merge request reports