Closed (cannot reproduce)
Project:
Wysiwyg
Version:
7.x-2.x-dev
Component:
Editor - markItUp
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Aug 2012 at 15:35 UTC
Updated:
13 Jun 2013 at 04:29 UTC
This affects both markItUp and the newly added Epic Editor (#1732880: Implement EpicEditor) or every filter that uses the Markdown filter
See here:
When you do want to insert a
<br />break tag using Markdown, you end a line with two or more spaces, then type return.
So it basicly works like this:
Foo\s\s\nbar
will be converted by markdown to this
Foo<br/>bar
but the wysiwyg-module apparently preprocesses it to
Foo\s\nbar
which will be converted to this by markdown:
Foo bar
so it appears like multiple spaces get collapsed to single one which breaks the logic of markdown
Comments
Comment #1
sunI don't believe that Wysiwyg module is touching the actual content in any way.
Can you prove that?
I'd rather guess that jQuery might be internally touching/rewriting text nodes, but it could as well be something completely different.
Comment #2
loominade commentedwhat do you mean?
jQuery's
.val(). returns and sets plain text as it is. Double spaces included. I just triedso i thought wysiwyg performs some kind of cleanup
Comment #3
twodDoes the markup look alright if you click "Disable rich-text" after inserting it into the editor?
I would assume the editor itself would remove duplicated whitespaces (I'm surprise the
\s\s\nwasn't just reduced to\nor simply considered source-code formatting and removed.Editors frequently remove whitespaces since they have no meaning in HTML when repeated. It's also difficult to preserve whitespaces across browser since they don't care much about them either, once the markup has been converted to a DOM tree. When serializing the DOM inside the editing area to markup again, most editors I've seen skip text nodes with just whitespaces and put in their own based on some source formatting rules handed to the via settings or builtin.
Comment #4
twodWithout further details about the problem I can only close this issue. Please re-open it if you can provide the requested information.