diff --git a/src/converter.js b/src/converter.js index 19cdb13..06550fa 100644 --- a/src/converter.js +++ b/src/converter.js @@ -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 { diff --git a/test/functional/makehtml/cases/issues/#697.space-between-inline-elements.html b/test/functional/makehtml/cases/issues/#697.space-between-inline-elements.html new file mode 100644 index 0000000..f2e6833 --- /dev/null +++ b/test/functional/makehtml/cases/issues/#697.space-between-inline-elements.html @@ -0,0 +1 @@ +

one two three

diff --git a/test/functional/makehtml/cases/issues/#697.space-between-inline-elements.md b/test/functional/makehtml/cases/issues/#697.space-between-inline-elements.md new file mode 100644 index 0000000..878c4dc --- /dev/null +++ b/test/functional/makehtml/cases/issues/#697.space-between-inline-elements.md @@ -0,0 +1 @@ +*one* *two* *three*