[pmwiki-devel] custom markup question...

adam overton a at plus1plus1plus.org
Sun Dec 12 16:00:01 CST 2010


hi

i'm trying to create a custom markup device that captures text and inserts other markup for any text lying between (:newmarkup:) and (:newmarkupend:)

for example:

	(:newmarkup:)
	text text
	text text text
	text
	text text
	(:newmarkupend:)


however the markup pattern i've created doesn't want to execute. i think it doesn't like to continue past the newlines in encounters? this is what i'm using:


Markup('createColumns', 'fulltext',
	'/\\(:createColumns\\s+(.*)\\s*:\\)(.*)\\(:createColumnsend:\\)/ie',
	'CreateColumns_func("$1","$2")'
);

function CreateColumns_func($args, $text) {
	echo "blam";
	echo "<br />$text";
}


any idea how i can get my markup to span the entire distance? i've tried different execution blocks besides 'fulltext', but with no success.

the ultimate goal will be to easily create tables of a particular height by specifying something like 
	(:createColumns perColumn=10:) 
-- then it automatically inserts (:cellnr:) markup at the appropriate intervals.

thanks!
adam


More information about the pmwiki-devel mailing list