1<?php 2/* 3 * Linebreaks, determined by two spaces at the line end. 4 */ 5 6if(!defined('DOKU_INC')) die(); 7if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 8require_once(DOKU_PLUGIN.'syntax.php'); 9 10class syntax_plugin_markdowku_linebreak extends DokuWiki_Syntax_Plugin { 11 12 function getType() { return 'substition'; } 13 function getPType() { return 'normal'; } 14 function getSort() { return 139; } 15 16 function connectTo($mode) { 17 $this->Lexer->addSpecialPattern( 18 '[ ]{2,}\n', 19 $mode, 20 'plugin_markdowku_linebreak'); 21 } 22 23 function handle($match, $state, $pos, Doku_Handler $handler) { 24 return array($match, $state, $pos); 25 } 26 27 function render($mode, Doku_Renderer $renderer, $data) { 28 $renderer->linebreak(); 29 return true; 30 } 31} 32//Setup VIM: ex: et ts=4 enc=utf-8 : 33