2 // PukiWiki - Yet another WikiWikiWeb clone
3 // $Id: setlinebreak.inc.php,v 1.5 2011/01/25 15:01:01 henoheno Exp $
5 // Set linebreak plugin - on/of linebreak-to-'<br />' conversion
8 // #setlinebreak : Invert on/off
9 // #setlinebreak(on) : ON (from this line)
10 // #setlinebreak(off) : OFF (from this line)
11 // #setlinebreak(default) : Reset
13 function plugin_setlinebreak_convert()
18 if (! isset($default)) $default = $line_break;
20 if (func_num_args() == 0) {
22 $line_break = ! $line_break;
24 $args = func_get_args();
25 switch (strtolower($args[0])) {
26 case 'on': /*FALLTHROUGH*/
27 case 'true': /*FALLTHROUGH*/
32 case 'off': /*FALLTHROUGH*/
33 case 'false': /*FALLTHROUGH*/
39 $line_break = $default;
43 return '#setlinebreak: Invalid argument: ' .
44 htmlsc($args[0]) . '<br />';