WordPress.org

Ready to get started?Download WordPress

Forums

HTML Import 2
[resolved] Including Line Breaks? (4 posts)

  1. suntower
    Member
    Posted 2 years ago #

    Is there a way to add line breaks? I'm trying to import a bunch of old Robohelp files. The results work OK, but there are no line breaks so the body of each post ends up being 'minified' in a very unfriendly looking mess.

    I was wondering if there was an option to do this (perhaps after every div or p) before I started trying to hack the plug.

    TIA,

    ---JC

    http://wordpress.org/extend/plugins/import-html-pages/

  2. Stephanie Leary
    Member
    Plugin Author

    Posted 1 year ago #

    You'll have to hack it, I'm afraid.

    In html-importer.php, comment out this line, around line 226:

    // reduce line breaks and remove empty tags
    $string = str_replace( '\n', ' ', $string );

    and these two lines around 335 or so:

    $doc->preserveWhiteSpace = false;
    $doc->formatOutput = false;  // speed this up
  3. suntower
    Member
    Posted 1 year ago #

    Wow. Message in a bottle. ;)

    It's a bit late for what I was doing at the time, but I do appreciate the reply. Likely will come in handy.

    Cheers,

    ---JC

  4. Stephanie Leary
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry about that. I'd fallen way behind on forum replies!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic