WP preformats contents using its wpautop() function before displaying it (unless disabled by a theme or whatever). The function mainly deals with creating paragraphs on contents where they don't exist and spacing around tables and such and such.

Joined to this issue is a module that turns wpautop() to a Drupal input filter, only slightly modified to use Drupal function name conventions. Fortunately, WP and Drupal both use GPL so I don't see license issues ahead.

I *think* it would belong in this WordPress Migrate module, as a submodule.

It might be relevant to offer the user the possibility to use this input filter as a preprocessor in Wordpress Migrate, to make it easy to assign another input filter on post-processed contents; not sure this input filter would be *that* useful to keep after migration in normal circumstances.

CommentFileSizeAuthor
wordpress_filter-7.x-1.0.tar_.gz2.34 KBptaff

Comments

mikeryan’s picture

Category: bug » feature
Priority: Normal » Minor
Status: Needs review » Postponed (maintainer needs more info)

I'm not sure I understand the need for this - I haven't seen any formatting problems in imported WordPress content that this would fix, and based on the comment it doesn't seem to do anything that the core "Convert line breaks into HTML" filter doesn't do.

/**
 * Replaces double line-breaks with paragraph elements.
 *
 * A group of regex replaces used to identify text formatted with newlines and
 * replace double line-breaks with HTML paragraph tags. The remaining
 * line-breaks after conversion become <<br />> tags, unless $br is set to '0'
 * or 'false'.
...
mikeryan’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

No further info provided.