Defect #43612
closed
Inline code rendering does not preserve multiple spaces
Added by Thomas Zauner 21 days ago.
Updated 20 days ago.
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
- 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 {
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.

- Target version changed from Candidate for next minor release to 6.1.1
Setting the target version to 6.1.1.
- Subject changed from CommonMark Markdown (github flavored) inline code: behaviour of multiple spaces to Inline code rendering does not preserve multiple spaces
- 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.
- Target version changed from 6.1.1 to 6.0.8
- Status changed from Resolved to Closed
Also available in: Atom
PDF