summaryrefslogtreecommitdiff
path: root/inc/parser/parser.php
diff options
context:
space:
mode:
authorAnika Henke <a.c.henke@arcor.de>2007-05-18 01:32:13 +0200
committerAnika Henke <a.c.henke@arcor.de>2007-05-18 01:32:13 +0200
commit07f89c3c8f7bdf32c835189da7cd6e8393ab8570 (patch)
treee344aa3f8f4dfe35ae9e7142e0cfef573231644b /inc/parser/parser.php
parentb27484c2fe1cc1a782f2788b4e3e02f6ef3fa7c8 (diff)
downloadrpg-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/parser.php')
-rw-r--r--inc/parser/parser.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index 709f063da..849c6f0ea 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -34,7 +34,7 @@ $PARSER_MODES = array(
// modes which have a start and end token but inside which
// no other modes should be applied
- 'protected' => array('preformatted','code','file','php','html'),
+ 'protected' => array('preformatted','code','file','php','html','htmlblock','phpblock'),
// inside this mode no wiki markup should be applied but lineendings
// and whitespace isn't preserved
@@ -489,10 +489,12 @@ class Doku_Parser_Mode_php extends Doku_Parser_Mode {
function connectTo($mode) {
$this->Lexer->addEntryPattern('<php>(?=.*</php>)',$mode,'php');
+ $this->Lexer->addEntryPattern('<PHP>(?=.*</PHP>)',$mode,'phpblock');
}
function postConnect() {
$this->Lexer->addExitPattern('</php>','php');
+ $this->Lexer->addExitPattern('</PHP>','phpblock');
}
function getSort() {
@@ -505,10 +507,12 @@ class Doku_Parser_Mode_html extends Doku_Parser_Mode {
function connectTo($mode) {
$this->Lexer->addEntryPattern('<html>(?=.*</html>)',$mode,'html');
+ $this->Lexer->addEntryPattern('<HTML>(?=.*</HTML>)',$mode,'htmlblock');
}
function postConnect() {
$this->Lexer->addExitPattern('</html>','html');
+ $this->Lexer->addExitPattern('</HTML>','htmlblock');
}
function getSort() {