Merge pull request #698 from systemsthinkinginstitute/fix-space-between-inline-elements

Fix space between inline elements
This commit is contained in:
Devyn S 2021-11-12 09:54:35 -07:00 committed by GitHub
commit 45fcc8435b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -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 {

View File

@ -0,0 +1 @@
<p><em>one</em> <em>two</em> <em>three</em></p>

View File

@ -0,0 +1 @@
*one* *two* *three*