diff options
author | Anika Henke <a.c.henke@arcor.de> | 2007-05-18 01:32:13 +0200 |
---|---|---|
committer | Anika Henke <a.c.henke@arcor.de> | 2007-05-18 01:32:13 +0200 |
commit | 07f89c3c8f7bdf32c835189da7cd6e8393ab8570 (patch) | |
tree | e344aa3f8f4dfe35ae9e7142e0cfef573231644b /inc/parser/handler.php | |
parent | b27484c2fe1cc1a782f2788b4e3e02f6ef3fa7c8 (diff) | |
download | rpg-07f89c3c8f7bdf32c835189da7cd6e8393ab8570.tar.gz rpg-07f89c3c8f7bdf32c835189da7cd6e8393ab8570.tar.bz2 |
added block mode for embedded html+php (FS#541) -- same syntax but in capital letters (<HTML>+<PHP>)
darcs-hash:20070517233213-d5083-9dbccf77383575912ad75533ca690302557e0f79.gz
Diffstat (limited to 'inc/parser/handler.php')
-rw-r--r-- | inc/parser/handler.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 0a021987f..9716bd74f 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -277,6 +277,18 @@ class Doku_Handler { return true; } + function phpblock($match, $state, $pos) { + global $conf; + if ( $state == DOKU_LEXER_UNMATCHED ) { + if ($conf['phpok']) { + $this->_addCall('phpblock',array($match), $pos); + } else { + $this->_addCall('file',array($match), $pos); + } + } + return true; + } + function html($match, $state, $pos) { global $conf; if ( $state == DOKU_LEXER_UNMATCHED ) { @@ -289,6 +301,18 @@ class Doku_Handler { return true; } + function htmlblock($match, $state, $pos) { + global $conf; + if ( $state == DOKU_LEXER_UNMATCHED ) { + if($conf['htmlok']){ + $this->_addCall('htmlblock',array($match), $pos); + } else { + $this->_addCall('file',array($match), $pos); + } + } + return true; + } + function preformatted($match, $state, $pos) { switch ( $state ) { case DOKU_LEXER_ENTER: @@ -1416,6 +1440,7 @@ class Doku_Handler_Block { 'quote_open', 'section_open', // Needed to prevent p_open between header and section_open 'code','file','hr','preformatted','rss', + 'htmlblock','phpblock', ); var $blockClose = array( @@ -1425,6 +1450,7 @@ class Doku_Handler_Block { 'quote_close', 'section_close', // Needed to prevent p_close after section_close 'code','file','hr','preformatted','rss', + 'htmlblock','phpblock', ); // Stacks can contain paragraphs |