diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-09-12 22:23:34 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-09-12 22:23:34 +0200 |
commit | 8e39ccf504d73d5d12e07bd879c5a696d5ceac3d (patch) | |
tree | e98977e1a3b2a5f3886da350b95c4a196ea04449 /inc/geshi/latex.php | |
parent | 535bed707571573f6670f91094e3c8eed6d9420c (diff) | |
download | rpg-8e39ccf504d73d5d12e07bd879c5a696d5ceac3d.tar.gz rpg-8e39ccf504d73d5d12e07bd879c5a696d5ceac3d.tar.bz2 |
GeSHi update to 1.0.8
darcs-hash:20080912202334-7ad00-ee4e69ad5516c38729955e8919d55f3b940caf1a.gz
Diffstat (limited to 'inc/geshi/latex.php')
-rw-r--r-- | inc/geshi/latex.php | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/inc/geshi/latex.php b/inc/geshi/latex.php index bba951cd3..14238aea4 100644 --- a/inc/geshi/latex.php +++ b/inc/geshi/latex.php @@ -4,7 +4,7 @@ * ----- * Author: efi, Matthias Pospiech (mail@matthiaspospiech.de) * Copyright: (c) 2006 efi, Matthias Pospiech (mail@matthiaspospiech.de), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.22 + * Release Version: 1\.0\.8 * Date Started: 2006/09/23 * * LaTeX language file for GeSHi. @@ -20,7 +20,7 @@ * ************************************************************************************* * - * This file is not yet part of GeSHi. (and is not compatible to the 1.1+ branch) + * This file is part of GeSHi. * * GeSHi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,14 +38,11 @@ * ************************************************************************************/ -if (isset($this) && is_a($this, 'GeSHi')) { - $this->set_symbols_highlighting(false); - $this->set_numbers_highlighting(false); -} - $language_data = array ( 'LANG_NAME' => 'LaTeX', - 'COMMENT_SINGLE' => array(1 => '%'), + 'COMMENT_SINGLE' => array( + 1 => '%' + ), 'COMMENT_MULTI' => array(), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array(), @@ -56,11 +53,7 @@ $language_data = array ( '.', ',','\\',"~", "{", "}", "[", "]", "$" ), 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => true, - 1 => false, - 2 => false, - 3 => false, - 4 => false, + GESHI_COMMENTS => false, ), 'STYLES' => array( 'KEYWORDS' => array( @@ -108,13 +101,13 @@ $language_data = array ( 'REGEXPS' => array( // Math inner 1 => array( - GESHI_SEARCH => "(\\\\begin\\{)(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign )(\\})(.*)(\\\\end\\{)(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign)(\\})", - GESHI_REPLACE => '\\4', - GESHI_MODIFIERS => 's', + GESHI_SEARCH => "(\\\\begin\\{)(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign)(\\})(.*)(\\\\end\\{)(\\2)(\\})", + GESHI_REPLACE => '\4', + GESHI_MODIFIERS => 'Us', GESHI_BEFORE => '\1\2\3', GESHI_AFTER => '\5\6\7' ), - // \keywords + // \keywords 2 => array( GESHI_SEARCH => "(\\\\)([a-zA-Z]+)", GESHI_REPLACE => '\1\2', @@ -126,23 +119,23 @@ $language_data = array ( 3 => array( GESHI_SEARCH => "(\\{)(.*)(\\})", GESHI_REPLACE => '\2', - GESHI_MODIFIERS => 'U', + GESHI_MODIFIERS => 'Us', GESHI_BEFORE => '\1', GESHI_AFTER => '\3' ), - // [Option] + // [options] 4 => array( GESHI_SEARCH => "(\[)(.+)(\])", GESHI_REPLACE => '\2', - GESHI_MODIFIERS => 'U', + GESHI_MODIFIERS => 'Us', GESHI_BEFORE => '\1', GESHI_AFTER => '\3' ), - // Mathe mit $ ... $ + // Math mode with $ ... $ 5 => array( GESHI_SEARCH => "(\\$)(.+)(\\$)", GESHI_REPLACE => '\1\2\3', - GESHI_MODIFIERS => 'U', + GESHI_MODIFIERS => 'Us', GESHI_BEFORE => '', GESHI_AFTER => '' ), @@ -152,7 +145,7 @@ $language_data = array ( GESHI_REPLACE => '\\1', GESHI_MODIFIERS => '', GESHI_BEFORE => '', - GESHI_AFTER => '\\2' + GESHI_AFTER => '' ), // Structure end 7 => array( @@ -160,15 +153,15 @@ $language_data = array ( GESHI_REPLACE => '\\1', GESHI_MODIFIERS => '', GESHI_BEFORE => '', - GESHI_AFTER => '\\2' + GESHI_AFTER => '' ), - //Structure: Label + // Structure: Label 8 => array( GESHI_SEARCH => "(\\\\)(label|pageref|ref|cite)(?=[^a-zA-Z])", GESHI_REPLACE => '\\1\\2', GESHI_MODIFIERS => '', GESHI_BEFORE => '', - GESHI_AFTER => '\\3' + GESHI_AFTER => '' ), // Structure: sections /*9 => array( @@ -203,7 +196,7 @@ $language_data = array ( GESHI_MODIFIERS => '', GESHI_BEFORE => '', GESHI_AFTER => '' - ), + ) // --------------------------------------------- ), @@ -212,9 +205,13 @@ $language_data = array ( ), 'HIGHLIGHT_STRICT_BLOCK' => array( ), - 'PARSER_CONTROL' => array( - 'COMMENTS' => array( - 'DISALLOWED_BEFORE' => '\\' + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '\\' + ), + 'ENABLE_FLAGS' => array( + 'NUMBERS' => GESHI_NEVER, + 'SYMBOLS' => GESHI_NEVER, ) ) ); |