Skip to content

Instantly share code, notes, and snippets.

@jugglinmike
Created January 14, 2019 17:58
Show Gist options
  • Save jugglinmike/facaedcb9706cd9d9b5d9a959e67c05b to your computer and use it in GitHub Desktop.
Save jugglinmike/facaedcb9706cd9d9b5d9a959e67c05b to your computer and use it in GitHub Desktop.
WP-Markdown: Newlines not recognized when preserving significant white space

Newlines not recognized when preserving significant white space

This is a bug report for the WP-Markdown project, originally reported here:

https://wordpress.org/support/topic/newlines-not-recognized-when-preserving-significant-white-space/

Input:


<p>p1 l1   <em>inside</em>   p1 l1</p>

<p>p2 l1 <em>end</em>
p2 l2</p>

<p>p3 l1
<em>begin</em> p3 l2</p>

Expected:


<p>p1 l1 <em>inside</em> p1 l1</p><p>p2 l1 <em>end</em> p2 l2</p><p>p3 l1 <em>begin</em> p3 l2</p>

(white space surrounding the emphasis element in all cases)

Actual:


<p>p1 l1 <em>inside</em> p1 l1</p><p>p2 l1 <em>end</em>p2 l2</p><p>p3 l1<em>begin</em> p3 l2</p>

(white space contributed by newlines removed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment