$HTMLcodeOutput = tidy_repair_string($HTMLcode, array('show-body-only' => true, 'indent' => true));
will remove $HTMLcode' end of line. Ex :
that's in the main box
##What does it do ?
it does everything
##Output:
Will output
that's in the main box ##What does it do ? it does everything
##Output: I will giv ea a grat output
This wouldn't be a problem if this string wasn't echoed into a < pre > tag thereafter. Thus, the \n or \r character IS important. I had a look at the documentation, but couldn't find anything obvious.
Is there any way to keep these line return characters ?
(Adding tags before using tidy string repair is a bad idea, as it will result in echoing the <pre> tags visible in the browser, as string (decoded), and not as tags.)