WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: HTML Import 2] Including Line Breaks?

[Resolved] [Plugin: HTML Import 2] Including Line Breaks?

  • 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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Stephanie Leary

    @sillybean

    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

    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

    Plugin Author Stephanie Leary

    @sillybean

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: HTML Import 2] Including Line Breaks?’ is closed to new replies.