Title: [Plugin: WP-Markdown] Breaks paragraphs
Last modified: August 20, 2016

---

# [Plugin: WP-Markdown] Breaks paragraphs

 *  [hypedtext](https://wordpress.org/support/users/hypedtext/)
 * (@hypedtext)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/)
 * This is a great plugin, thanks!
 * However, when saving existing posts for the first time with this plugin it breaks
   the paragraphs.
 * [http://wordpress.org/extend/plugins/wp-markdown/](http://wordpress.org/extend/plugins/wp-markdown/)

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/page/2/?output_format=md)

 *  Plugin Author [Stephen Harris](https://wordpress.org/support/users/stephenh1988/)
 * (@stephenh1988)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822469)
 * Hi hyptedtext, sorry for the delayed response – for some reason I wasn’t notified
   of this post.
 * In what way does it break paragraphs? Does it strip them out?
 *  Thread Starter [hypedtext](https://wordpress.org/support/users/hypedtext/)
 * (@hypedtext)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822470)
 * Something like that. Sorry I forget exactly what it did.
 *  [ChrisOBrien](https://wordpress.org/support/users/chrisobrien/)
 * (@chrisobrien)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822477)
 * Hi Stephen,
    So I am having a problem that might sound like this one. I’m not
   sure if my problem is hypedtext’s problem, but I didn’t want to create unnecessary
   threads…
 * The line breaks (two spaces at the end of a line) do not seem to be transferring
   into a post preview page. The blog summary page has all the line jumbled, but
   when I click the “read more” link, the blog post contains the line breaks. If
   I edit the post, the two spaces at the end of the line are stripped and not in
   the editor.
 * Not sure if I am explaining this well. An example is here:
    preview page: [http://www.christopherobrien.net/category/blog/](http://www.christopherobrien.net/category/blog/)
   main blog entry: [http://www.christopherobrien.net/a-daring-new-world/](http://www.christopherobrien.net/a-daring-new-world/)
 * I was sort of thinking this might be the wordpress theme causing the problem,
   but the fact that the two spaces at the end of the line are being stripped has
   me guessing about the plug-in.
 * Any help insight would be greatly appreciated.
    (Using 3.4.2 WordPress and 1.1.5
   wp-markdown)
 *  [mnmcdonald](https://wordpress.org/support/users/mnmcdonald/)
 * (@mnmcdonald)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822478)
 * For some reason when I try to do the double space return for a line break it’s
   not registering. This doesn’t work in either posts or pages.
 *  [jj0b](https://wordpress.org/support/users/jj0b/)
 * (@jj0b)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822480)
 * I am also having an issue where line breaks/white space are not being respected.
   They show up fine in the preview below the editor but do not get included on 
   the actual post or page.
 * Other elements do work on the post and page but some others do not. For example
   code blocks show up fine as do bold and italics but titles do not work.
 *  Plugin Author [Stephen Harris](https://wordpress.org/support/users/stephenh1988/)
 * (@stephenh1988)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822481)
 * Hi mnmcdonald – sorry I’ve take a while to get back to you. This isn’t a bug.
   The content on the front of your site is an excerpts. WordPress strips out the
   paragraph tags (among other things) on an excerpt. If you disable WP-Markdown
   and just use the TinyMCE editor you’ll see that the same thing happens.
 * jj0b – what are you using for headers? `#`, `##`, `###` work fine for me as do
   breaks/white space. Try the plug-in using the TwentyEleven theme and see if that
   works. If so, its something your theme is doing. If not, try disabling other 
   plug-ins in case there is a conflict. If it still doesn’t work, then let me know
   so I can investigate it futher.
 *  [jj0b](https://wordpress.org/support/users/jj0b/)
 * (@jj0b)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822482)
 * Thanks Stephen, you are right, things work fine with the default theme so we 
   just need to fix our custom theme.
 *  [mnmcdonald](https://wordpress.org/support/users/mnmcdonald/)
 * (@mnmcdonald)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822483)
 * Howdy Stephen!
 * Thanks for the reply! I haven’t tested it on the front page with standard posts(
   good thing to keep in mind though), but where I’m seeing the issue is on a standard
   page. If you want to take a gander the page is:
 * [http://lengthyroad.com/colophon/](http://lengthyroad.com/colophon/)
 * Thanks for the reply and I look forward to any advice you might have!
 *  [mnmcdonald](https://wordpress.org/support/users/mnmcdonald/)
 * (@mnmcdonald)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822484)
 * Tested my posts…the strip they br as well.
 * Correct me if I’m wrong, but to insert a blank line it should be:
 * <space><space><return>
 * That inserts the line break if I remember Markdown syntax correctly.
 * My posts are in full format (not excerpt), so I don’ think I was experiencing
   the issue that Chris (the poster above my original comment) was experiencing.
 *  Plugin Author [Stephen Harris](https://wordpress.org/support/users/stephenh1988/)
 * (@stephenh1988)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822485)
 * I think a blank line is two returns….?
 * I’ve had a look at your post – but I can’t see anything wrong…
 * You’re right though that br tags are stripped. These are replaced by ‘\n’ when
   being saved (as this is what WordPress expects). On output, WordPress uses [`wpautop`](https://github.com/WordPress/WordPress/blob/3.4.2/wp-includes/formatting.php#L175)
   to change these to paragraph tags.
 * Sorry for the delay in responding, I wasn’t get the email notifications for some
   reason…
 *  Plugin Author [Stephen Harris](https://wordpress.org/support/users/stephenh1988/)
 * (@stephenh1988)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822486)
 * The part of the plug-in that removes the br tags will probably be removed in 
   the next update. It was intended to provide support for oembed. This has proven
   too difficult, so oembed can only be used with shortcodes.
 * The function I’m referring to is here: [https://github.com/stephenh1988/WP-MarkDown/blob/master/wp-markdown.php#L245](https://github.com/stephenh1988/WP-MarkDown/blob/master/wp-markdown.php#L245).
 * If this is causing the problem, feel free to comment out lines 69 and 72 of: 
   [https://github.com/stephenh1988/WP-MarkDown/blob/1.1.5/wp-markdown.php#L69](https://github.com/stephenh1988/WP-MarkDown/blob/1.1.5/wp-markdown.php#L69)
   as these will probably be removed in 1.1.6 and see if that resolves it for you.
 *  [mnmcdonald](https://wordpress.org/support/users/mnmcdonald/)
 * (@mnmcdonald)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822487)
 * To give you an example of what I’m trying to do, I want TWO blank lines between
   paragraphs of text. I cannot find a way to do this and had attributed it to the
   
   tags being stripped.
 *  [mnmcdonald](https://wordpress.org/support/users/mnmcdonald/)
 * (@mnmcdonald)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822488)
 * Commented out the lines, still can have two blank lines 🙁
 *  Plugin Author [Stephen Harris](https://wordpress.org/support/users/stephenh1988/)
 * (@stephenh1988)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822489)
 * You’re right, I’ve just tried myself. Reading this: [http://daringfireball.net/projects/markdown/syntax#p](http://daringfireball.net/projects/markdown/syntax#p)–
   it seems its not part of the spec. It should probably not strip out the br tags–
   but after doing some tests, the culprit it seems is the HTML -> MarkDown converter.
 *  Plugin Author [Stephen Harris](https://wordpress.org/support/users/stephenh1988/)
 * (@stephenh1988)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/#post-2822490)
 * Found the function responsible: [https://github.com/stephenh1988/WP-MarkDown/blob/1.1.5/markdownify/markdownify.php](https://github.com/stephenh1988/WP-MarkDown/blob/1.1.5/markdownify/markdownify.php)
 * Changing
 * `$this->out(" \n".$this->indent, true);`
 * To
    `$this->out("<br>",true);`
 * Prevents the br tags from being stripped (on my dev version where the above functions
   you have commented out have been removed). But I’m not sure if this has any adverse
   effects, so I might not implement this change. Though I might consider adding
   in a filter – I’ll post here with what I plan to do prior to the next release.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/page/2/?output_format=md)

The topic ‘[Plugin: WP-Markdown] Breaks paragraphs’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-markdown_d5ecec.svg)
 * [WP-Markdown](https://wordpress.org/plugins/wp-markdown/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-markdown/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-markdown/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-markdown/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-markdown/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-markdown/reviews/)

 * 16 replies
 * 5 participants
 * Last reply from: [mnmcdonald](https://wordpress.org/support/users/mnmcdonald/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/plugin-wp-markdown-breaks-paragraphs/page/2/#post-2822493)
 * Status: not resolved