[pmwiki-users] linebreaks behavior setting in config.php?

Tegan Dowling tmdowling at gmail.com
Fri Feb 9 11:54:43 CST 2007

On 2/9/07, Castiron <castiron at gmail.com> wrote:
> I'd gotten the impression from the last couple go-rounds on
> (:linebreaks:) that you could set something in config.php to make your
> PmWiki installation default to breaking lines at carriage returns, but
> I can't figure out how to do it.  Is this actually possible?
> (I'm one of the folks who ends up adding (:linebreaks:) on 95% of the
> new pages I create, so it'd be simpler to just change my wiki's
> default.)

I use the following in config.php on all of my wikis, to accomplish
this.  I have no idea how it works or where I got it.  I've always
meant to ask the community if there are any problems with it, and (if
there are no problems), to post it to the documentation.

	// Force PmWiki to honor line breaks -
http://www.pmwiki.org/wiki/Cookbook/LineBreaks and
	// enable (:linebreaks:) and (:nolinebreaks:) markups to toggle
between the modes:
		$HTMLPNewline = '<br />';
		Markup('linebreaks', 'directives', '/\\(:(no)?linebreaks:\\)/e',
     		"PZZ(\$GLOBALS['HTMLPNewline'] = ('$1'!='no') ? '<br />' : '')");

Can someone explain why most of PmWiki's web admins apparently do NOT
want this (or a cleaner version of it, if there's any problem with
this version) behavior as the default?

More information about the pmwiki-users mailing list