[Pmwiki-users] weird results from doublebrackets extension

Paul Williams paulw
Thu Nov 4 12:31:13 CST 2004


All,

I'm trying to write a graphviz extension to pmwiki 1.x, and I've run intoa very
interesting problem.  This problem is also documented on PITS issue #137.

The syntax for the graphviz extension looks like this:

=graphviz [=
digraph G {
	foo->bar;
	foo->baz;
}
=]

If the function looks like the following:

function graphviz( $dot) {
	return $dot
}

I get what I expect:

digraph G {
	foo->bar;
	foo->baz;
}

However, if I do anything at all to the $dot variable, I get some very suprising
results:

function graphviz( $dot) {
	print_r( $dot)
}

shows

?1?

This behavior is the same if I try to write $dot to a file, concatinate it with
another string etc.  The only thing that works properly is if I return itunchanged.

Does anyone know a workaround for this???

Thanks!
   ~ Paul






More information about the pmwiki-users mailing list