[go: up one dir, main page]

Skip to content

Indentation lost in commit message when viewed from a merge request

Summary

When a commit message is viewed from the MR UI, its indentation is lost.

Steps to reproduce

image

This commit message has indentation, but it is not being displayed.

  • Click on the commit title, then click on the commit ID in the sentence "Viewing commit [ID]". This goes to the commit's page outside of the MR UI, which does have the indentation:

image

Example Project

https://gitlab.com/lilypond/lilypond

What is the current bug behavior?

Indentation is lost.

What is the expected correct behavior?

Indentation is kept.

Possible Fixes

It looks like we apply the class .gl-white-space-pre-line on the commit messages which strips all the whitespace formatting. We could switch this to .gl-white-space-pre-wrap, but that may make it more challenging as you see line wraps in the commit, but you do get the proper spacing:

Screenshot_2023-03-28_at_8.58.56_AM

Edited by Kai Armstrong