Project

General

Profile

Actions

Defect #43612

open

CommonMark Markdown (github flavored) inline code: behaviour of multiple spaces

Added by Thomas Zauner about 4 hours ago. Updated about 2 hours ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
Text formatting
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
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 about 3 hours 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 about 2 hours 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

Also available in: Atom PDF