Project

General

Profile

Actions

Defect #43612

closed

Inline code rendering does not preserve multiple spaces

Added by Thomas Zauner 20 days ago. Updated 19 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Text formatting
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

If I write a text with many spaces, currently - in the description field and also using inline code in the description - redmine seems to reduced multiple spaces to one.
For the normal description this might be fine, but if you use markdown and inline code, you wouldn`t expect that spaces are reduced.

If you take a look at gitlab/github, the spaces will remain in inline code using markdown.


String

a   b             c

Github:

Redmine:


Files

Actions #1

Updated by Go MAEDA 20 days ago

  • Tracker changed from Patch to Defect
  • Status changed from New to Confirmed
  • Target version set to Candidate for next minor release

Thank you for reporting the issue. The following patch fixes the issue.

diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 5fcbd58cc..d416688a5 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -1613,6 +1613,7 @@ div.wiki *:not(pre)>code, div.wiki>code {
   background: rgba(var(--oc-gray-9-rgb), 0.08);
   padding: 0.1em 0.1em;
   border-radius: 0.1em;
+  white-space: pre-wrap;
 }

 div.pre-wrapper a.copy-pre-content-link {
Actions #2

Updated by Thomas Zauner 20 days ago

Go MAEDA wrote in #note-1:

The following patch fixes the issue.

I only inspected the html code element and thought there is some sort of string replacement. But you are right, its purely CSS.
Tested with chrome development console on our redmine instance, looks fine with the fix.

Actions #3

Updated by Go MAEDA 20 days ago

  • Target version changed from Candidate for next minor release to 6.1.1

Setting the target version to 6.1.1.

Actions #4

Updated by Go MAEDA 20 days ago

  • Subject changed from CommonMark Markdown (github flavored) inline code: behaviour of multiple spaces to Inline code rendering does not preserve multiple spaces
Actions #5

Updated by Go MAEDA 20 days ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the fix in r24220. Thank you for reporting this issue.

Actions #6

Updated by Go MAEDA 20 days ago

  • Target version changed from 6.1.1 to 6.0.8
Actions #7

Updated by Go MAEDA 19 days ago

  • Status changed from Resolved to Closed

Merged the fix into stable branches in r24221 and r24222.

Actions

Also available in: Atom PDF