Skip to content

Fix wrong CRLF rendering

What does this MR do and why?

Fixes #369588 (closed)

In the past, CRLF was always converted to LF. If I understand it correctly, this is no longer desired.

Therefore the UI should be able to handle different types of linebreaks.

The problem is that the dos-linebreaks (CRLF) are in the form \r\n and so far the lines are only split by \n, so \r is left out, which is also interpreted as newline. See images below

Screenshots or screen recordings

Input: notepad++

Before: before_comment comment_wrong

After: after_comment comment_right

How to set up and validate locally

  1. Create a new project
  2. Create a file locally called hi.h with the following content:
/*
 * This is a comment block
 * There should only be
 * One space between
 * These lines
*/
  1. Ensure it has CRLF line terminators. This can be done via vim :set ff=dos
  2. Push the file to your project.
  3. Confirm Preview syntax highlighting.

🛠 with at Siemens

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Andreas Deicha

Merge request reports

Loading