diff options
-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); } /** |