1<?php 2/** 3 * Emphasis Plugin: Enables text highlighting with 4 * ;;text;;, ;;;text;;;, ;;;;text;;;; 5 * 6 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 7 * @author Gerrit Uitslag <klapinklapin@gmail.com> 8 */ 9 10/** 11 * All DokuWiki plugins to extend the parser/rendering mechanism 12 * need to inherit from this class 13 */ 14class syntax_plugin_emphasis_background extends syntax_plugin_emphasis_font { 15 16 /** 17 * Connect lookup pattern to lexer. 18 * 19 * @param string $mode Parser mode 20 */ 21 function connectTo($mode) { 22 $this->Lexer->addEntryPattern(';{2,}(?=.*?;{2,})', $mode, 'plugin_emphasis_background'); 23 } 24 25 function postConnect() { 26 $this->Lexer->addExitPattern(';{2,}', 'plugin_emphasis_background'); 27 } 28 29 30} 31