1<?php 2/** 3 * Hidden Comment Plugin: allows hidden comments in the wiki source 4 * 5 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 6 * @author Esther Brunner <wikidesign@gmail.com> 7 */ 8 9// must be run within Dokuwiki 10if(!defined('DOKU_INC')) die(); 11 12if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 13require_once(DOKU_PLUGIN.'syntax.php'); 14 15/** 16 * All DokuWiki plugins to extend the parser/rendering mechanism 17 * need to inherit from this class 18 */ 19class syntax_plugin_comment extends DokuWiki_Syntax_Plugin { 20 21 function getType(){ return 'substition'; } 22 function getSort(){ return 321; } 23 24 function connectTo($mode) { 25 $this->Lexer->addSpecialPattern("^/\*.*?\*|\s+/\*.*?\*/", $mode, 'plugin_comment'); 26 } 27 28 function handle($match, $state, $pos, Doku_Handler $handler){ return ''; } 29 function render($mode, Doku_Renderer $renderer, $data) { return true; } 30} 31// vim:ts=4:sw=4:et:enc=utf-8: 32