Michael A. Peters wrote:
I'm experiencing a slight problem with importNODE putting unwanted
carriage returns in the the output.
Here's my function:
// syntax highlighting
include_once('Text/Highlighter.php');
function syntaxHighlight($dom,$lang,$code) {
$hl =& Text_Highlighter::factory($la
Jochem Maas wrote:
highlight_string() function might be an easier route?
If I only ever wanted to highlight php it might be.
I found a workaround, though I don't like it.
add
$dom->formatOutput = false;
to the function and it displays perfectly, though viewing the generated
source isn't as
highlight_string() function might be an easier route?
Op 1/25/10 9:55 AM, Michael A. Peters schreef:
> I'm experiencing a slight problem with importNODE putting unwanted
> carriage returns in the the output.
>
> Here's my function:
>
> // syntax highlighting
> include_once('Text/Highlighter.php'
Michael A. Peters wrote:
The only (untried) solution I can think of is to replace each carriage
return with a and every space with and then replace the
with a or some such hackery before running
loadXML() on it. But I would rather not do that.
Even that isn't really working but what I
I'm experiencing a slight problem with importNODE putting unwanted
carriage returns in the the output.
Here's my function:
// syntax highlighting
include_once('Text/Highlighter.php');
function syntaxHighlight($dom,$lang,$code) {
$hl =& Text_Highlighter::factory($lang);
$out = $hl->highli
5 matches
Mail list logo