"on"),FALSE,TRUE); } } /* * What kind of syntax are we? */ function getType() { return 'substition'; } /* * Where to sort in? */ function getSort() { return 155; } /* * Paragraph Type */ function getPType() { return 'normal'; } /* * Connect pattern to lexer */ function connectTo($mode) { $this->Lexer->addSpecialPattern("~~NOSECTIONEDIT~~",$mode,'plugin_nosecedit'); } /* * Handle the matches */ function handle($match, $state, $pos, &$handler) { global $ID; return (array($ID=>TRUE)); } /* * Create output */ function render($mode, &$renderer, $opt) { global $ID; //save flags to metadata //if($mode == 'metadata') { if (isset($opt[$ID])==TRUE) { p_set_metadata($ID,array("sectionedit"=>"off"),FALSE,TRUE); } else { p_set_metadata($ID,array("sectionedit"=>"on"),FALSE,TRUE); } } return (TRUE); } } //Setup VIM: ex: et ts=4 enc=utf-8 :