diff options
author | andi <andi@splitbrain.org> | 2005-04-06 20:21:11 +0200 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-04-06 20:21:11 +0200 |
commit | 11d0aa478c0ed10f26b6f8d7a1f1ab9404464cd3 (patch) | |
tree | 544babe66ea3466adb75aca79834b77c98beadba | |
parent | def3530d42728b132e4280503f1336abcab43a49 (diff) | |
download | rpg-11d0aa478c0ed10f26b6f8d7a1f1ab9404464cd3.tar.gz rpg-11d0aa478c0ed10f26b6f8d7a1f1ab9404464cd3.tar.bz2 |
new parser: camelcase works
darcs-hash:20050406182111-9977f-1de9796a2badb831b65ed6c5ca14d9508e56f4cc.gz
-rw-r--r-- | inc/parser/action.php | 11 | ||||
-rw-r--r-- | inc/parser/xhtml.php | 15 |
2 files changed, 9 insertions, 17 deletions
diff --git a/inc/parser/action.php b/inc/parser/action.php index 67864b729..18238a2d7 100644 --- a/inc/parser/action.php +++ b/inc/parser/action.php @@ -8,6 +8,8 @@ if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); function parse_to_instructions($text){ + global $conf; + require_once DOKU_INC . 'inc/parser/parser.php'; // Create the parser @@ -50,14 +52,17 @@ function parse_to_instructions($text){ $Parser->addMode('multiplyentity',new Doku_Parser_Mode_MultiplyEntity()); $Parser->addMode('quotes',new Doku_Parser_Mode_Quotes()); - - $Parser->addMode('camelcaselink',new Doku_Parser_Mode_CamelCaseLink()); + + if($conf['camelcase']){ + $Parser->addMode('camelcaselink',new Doku_Parser_Mode_CamelCaseLink()); + } + $Parser->addMode('internallink',new Doku_Parser_Mode_InternalLink()); $Parser->addMode('media',new Doku_Parser_Mode_Media()); $Parser->addMode('externallink',new Doku_Parser_Mode_ExternalLink()); $Parser->addMode('email',new Doku_Parser_Mode_Email()); $Parser->addMode('windowssharelink',new Doku_Parser_Mode_WindowsShareLink()); - $Parser->addMode('filelink',new Doku_Parser_Mode_FileLink()); + //$Parser->addMode('filelink',new Doku_Parser_Mode_FileLink()); //FIXME ??? $Parser->addMode('eol',new Doku_Parser_Mode_Eol()); // Do the parsing diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 7d14d59e4..5cb4b3001 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -360,22 +360,9 @@ class Doku_Renderer_XHTML extends Doku_Renderer { } /** - * @TODO Handle local vs. global namespace checks */ function camelcaselink($link) { - - echo '<a href="'.$link.'"'; - - if ( wikiPageExists($link) ) { - echo ' class="wikilink1"'; - } else { - echo ' class="wikilink2"'; - } - - // Probably dont need to convert entities - parser would have rejected it - echo ' onclick="return svchk()" onkeypress="return svchk()">'; - echo $this->__xmlEntities($link); - echo '</a>'; + $this->internallink($link,$link); } /** |