Extracts private methods out of Notebook::DiffFile - Part 1
Why
Notebook::DiffFile is getting too complex and hard to test, so in order to make it easier to fix bugs (#364533 (closed)) we are refactoring the private methods out of it.
What
To minimize the size of this MR, part 1 creates the helper and extract methods:
- map_diff_block_to_source_line
- map_transformed_line_to_source
- strip_diff_frontmatter
- image_as_rich_text
Further methods will be extract in a different MR
How to test
This a pure refactor, feature or logic changes.The code is run and jupyter notebooks diff is opened (eg gitlab-test@5d6ed150 on your gdk), so if there is any regression it should be seen there.
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.
Related to #364533 (closed)
Edited by Eduardo Bonet