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

  1. suntower
    Posted 4 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.




  2. Stephanie Leary
    Plugin Author

    Posted 3 years 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
    Posted 3 years 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.



  4. Stephanie Leary
    Plugin Author

    Posted 3 years 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

  • HTML Import 2
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic