mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
preserve spaces between inline elements
This commit is contained in:
parent
33bba54535
commit
001b1881d0
|
@ -393,7 +393,7 @@ showdown.Converter = function (converterOptions) {
|
|||
for (var n = 0; n < node.childNodes.length; ++n) {
|
||||
var child = node.childNodes[n];
|
||||
if (child.nodeType === 3) {
|
||||
if (!/\S/.test(child.nodeValue)) {
|
||||
if (!/\S/.test(child.nodeValue) && !/^[ ]+$/.test(child.nodeValue)) {
|
||||
node.removeChild(child);
|
||||
--n;
|
||||
} else {
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<p><em>one</em> <em>two</em> <em>three</em></p>
|
|
@ -0,0 +1 @@
|
|||
*one* *two* *three*
|
Loading…
Reference in New Issue
Block a user