plugin:tab
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
plugin:tab [2011-09-22 10:39] – [New Code] 93.199.162.152 | plugin:tab [2018-02-14 13:01] – [Code] Juergen_aus_Zuendorf | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Tab ====== | + | ====== Tab Plugin |
---- plugin ---- | ---- plugin ---- | ||
Line 6: | Line 6: | ||
email : timskoch@hotmail.com | email : timskoch@hotmail.com | ||
type : syntax | type : syntax | ||
- | lastupdate : 2006-08-16 | + | lastupdate : 2018-02-06 |
compatible : | compatible : | ||
depends | depends | ||
Line 50: | Line 50: | ||
' | ' | ||
' | ' | ||
- | ' | + | ' |
' | ' | ||
' | ' | ||
Line 102: | Line 102: | ||
* Handle the match | * Handle the match | ||
*/ | */ | ||
- | function handle($match, | + | function handle($match, |
switch ($state) { | switch ($state) { | ||
case DOKU_LEXER_ENTER : | case DOKU_LEXER_ENTER : | ||
Line 121: | Line 121: | ||
* Create output | * Create output | ||
*/ | */ | ||
- | function render($mode, | + | function render($mode, |
if($mode == ' | if($mode == ' | ||
$renderer-> | $renderer-> | ||
Line 132: | Line 132: | ||
//Setup VIM: ex: et ts=4 enc=utf-8 : | //Setup VIM: ex: et ts=4 enc=utf-8 : | ||
- | |||
</ | </ | ||
+ | --- [[user> | ||
+ | -> Changes for compatibility to PHP7:\\ | ||
+ | "& | ||
===== Installation ===== | ===== Installation ===== | ||
Line 244: | Line 246: | ||
---- | ---- | ||
- | === Enhancement/ | + | ==== Enhancement/ |
// | // | ||
- | If you modify the code according below you can define the quantity of "& | + | If you modify the code according below you can define the quantity of "& |
following both syntax lines are working: | following both syntax lines are working: | ||
< | < | ||
<tab> 5 times "& | <tab> 5 times "& | ||
- | < | + | < |
</ | </ | ||
<code php> | <code php> | ||
- | /** Connect pattern to lexer */ | + | // Connect pattern to lexer |
function connectTo($mode) { | function connectTo($mode) { | ||
- | $this-> | + | $this-> |
- | /** Handle the match */ | + | // Handle the match |
function handle($match, | function handle($match, | ||
- | $match = substr($match, | + | $match = substr($match, |
- | if (strlen($match)> | + | |
+ | if ((strlen($match)> | ||
$data .= str_repeat('&# | $data .= str_repeat('&# | ||
} | } | ||
- | else { // if standard tab is used then insert 5 spaces | + | else { // if standard tab is used then insert 5 spaces |
$data = '&# | $data = '&# | ||
} | } | ||
Line 272: | Line 275: | ||
} | } | ||
- | /** Create output | + | // Create output |
function render($mode, | function render($mode, | ||
if($mode == ' | if($mode == ' |
plugin/tab.txt · Last modified: 2020-05-14 22:36 by Juergen_aus_Zuendorf