diff options
Diffstat (limited to 'extensions/SyntaxHighlight_GeSHi/geshi/docs/api')
63 files changed, 0 insertions, 9878 deletions
diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/__filesource/fsource_geshi_core_geshi.php.html b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/__filesource/fsource_geshi_core_geshi.php.html deleted file mode 100644 index a8ff361c..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/__filesource/fsource_geshi_core_geshi.php.html +++ /dev/null @@ -1,4616 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <!-- template designed by Marco Von Ballmoos --> - <title>File Source for geshi.php</title> - <link rel="stylesheet" href="../media/stylesheet.css" /> - <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> - </head> - <body> - <h1>Source for file geshi.php</h1> -<p>Documentation is available at <a href="../geshi/core/_geshi.php.html">geshi.php</a></p> -<div class="src-code"> -<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li> -<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * GeSHi - Generic Syntax Highlighter</span></div></li> -<li><div class="src-line"><a name="a4"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a5"></a><span class="src-doc"> * The GeSHi class for Generic Syntax Highlighting. Please refer to the</span></div></li> -<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * documentation at http://qbnz.com/highlighter/documentation.php for more</span></div></li> -<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * information about how to use this class.</span></div></li> -<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * For changes, release notes, TODOs etc, see the relevant files in the docs/</span></div></li> -<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * directory.</span></div></li> -<li><div class="src-line"><a name="a11"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * This file is part of GeSHi.</span></div></li> -<li><div class="src-line"><a name="a13"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * GeSHi is free software; you can redistribute it and/or modify</span></div></li> -<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * it under the terms of the GNU General Public License as published by</span></div></li> -<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * the Free Software Foundation; either version 2 of the License, or</span></div></li> -<li><div class="src-line"><a name="a17"></a><span class="src-doc"> * (at your option) any later version.</span></div></li> -<li><div class="src-line"><a name="a18"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * GeSHi is distributed in the hope that it will be useful,</span></div></li> -<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div></li> -<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div></li> -<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * GNU General Public License for more details.</span></div></li> -<li><div class="src-line"><a name="a23"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * You should have received a copy of the GNU General Public License</span></div></li> -<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * along with GeSHi; if not, write to the Free Software</span></div></li> -<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span></div></li> -<li><div class="src-line"><a name="a27"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> geshi</span></div></li> -<li><div class="src-line"><a name="a29"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> core</span></div></li> -<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Nigel McNie <nigel@geshi.org>, Benny Baumann <BenBE@omorphia.de></span></div></li> -<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2008 Benny Baumann</span></div></li> -<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://gnu.org/copyleft/gpl.html GNU GPL</span></div></li> -<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a34"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a35"></a> </div></li> -<li><div class="src-line"><a name="a36"></a><span class="src-comm">//</span></div></li> -<li><div class="src-line"><a name="a37"></a><span class="src-comm">// GeSHi Constants</span></div></li> -<li><div class="src-line"><a name="a38"></a><span class="src-comm">// You should use these constant names in your programs instead of</span></div></li> -<li><div class="src-line"><a name="a39"></a><span class="src-comm">// their values - you never know when a value may change in a future</span></div></li> -<li><div class="src-line"><a name="a40"></a><span class="src-comm">// version</span></div></li> -<li><div class="src-line"><a name="a41"></a><span class="src-comm">//</span></div></li> -<li><div class="src-line"><a name="a42"></a> </div></li> -<li><div class="src-line"><a name="a43"></a><span class="src-doc">/** The version of this GeSHi file */</span></div></li> -<li><div class="src-line"><a name="a44"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_VERSION'</span><span class="src-sym">, </span><span class="src-str">'1.0.8.2'</span><span class="src-sym">,</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a45"></a> </div></li> -<li><div class="src-line"><a name="a46"></a><span class="src-comm">// Define the root directory for the GeSHi code tree</span></div></li> -<li><div class="src-line"><a name="a47"></a><span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/defined">defined</a><span class="src-sym">(</span><span class="src-str">'GESHI_ROOT'</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a48"></a> <span class="src-doc">/** The root directory for GeSHi */</span></div></li> -<li><div class="src-line"><a name="a49"></a> <a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_ROOT'</span><span class="src-sym">, </span><span class="src-id">dirname</span><span class="src-sym">(</span>__FILE__<span class="src-sym">) </span>. <span class="src-id">DIRECTORY_SEPARATOR</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a50"></a><span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a51"></a><span class="src-doc">/** The language file directory for GeSHi</span></div></li> -<li><div class="src-line"><a name="a52"></a><span class="src-doc"> @access private */</span></div></li> -<li><div class="src-line"><a name="a53"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_LANG_ROOT'</span><span class="src-sym">, </span><span class="src-id">GESHI_ROOT </span>. <span class="src-str">'geshi' </span>. <span class="src-id">DIRECTORY_SEPARATOR</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a54"></a> </div></li> -<li><div class="src-line"><a name="a55"></a><span class="src-comm">// Define if GeSHi should be paranoid about security</span></div></li> -<li><div class="src-line"><a name="a56"></a><span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/defined">defined</a><span class="src-sym">(</span><span class="src-str">'GESHI_SECURITY_PARANOID'</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a57"></a> <span class="src-doc">/** Tells GeSHi to be paranoid about security settings */</span></div></li> -<li><div class="src-line"><a name="a58"></a> <a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_SECURITY_PARANOID'</span><span class="src-sym">, </span><span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a59"></a><span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a60"></a> </div></li> -<li><div class="src-line"><a name="a61"></a><span class="src-comm">// Line numbers - use with enable_line_numbers()</span></div></li> -<li><div class="src-line"><a name="a62"></a><span class="src-doc">/** Use no line numbers when building the result */</span></div></li> -<li><div class="src-line"><a name="a63"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NO_LINE_NUMBERS'</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a64"></a><span class="src-doc">/** Use normal line numbers when building the result */</span></div></li> -<li><div class="src-line"><a name="a65"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NORMAL_LINE_NUMBERS'</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a66"></a><span class="src-doc">/** Use fancy line numbers when building the result */</span></div></li> -<li><div class="src-line"><a name="a67"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_FANCY_LINE_NUMBERS'</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a68"></a> </div></li> -<li><div class="src-line"><a name="a69"></a><span class="src-comm">// Container HTML type</span></div></li> -<li><div class="src-line"><a name="a70"></a><span class="src-doc">/** Use nothing to surround the source */</span></div></li> -<li><div class="src-line"><a name="a71"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_HEADER_NONE'</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a72"></a><span class="src-doc">/** Use a "div" to surround the source */</span></div></li> -<li><div class="src-line"><a name="a73"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_HEADER_DIV'</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a74"></a><span class="src-doc">/** Use a "pre" to surround the source */</span></div></li> -<li><div class="src-line"><a name="a75"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_HEADER_PRE'</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a76"></a><span class="src-doc">/** Use a pre to wrap lines when line numbers are enabled or to wrap the whole code. */</span></div></li> -<li><div class="src-line"><a name="a77"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_HEADER_PRE_VALID'</span><span class="src-sym">, </span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a78"></a><span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a79"></a><span class="src-doc"> * Use a "table" to surround the source:</span></div></li> -<li><div class="src-line"><a name="a80"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a81"></a><span class="src-doc"> * <table></span></div></li> -<li><div class="src-line"><a name="a82"></a><span class="src-doc"> * <thead><tr><td colspan="2">$header</td></tr></thead></span></div></li> -<li><div class="src-line"><a name="a83"></a><span class="src-doc"> * <tbody><tr><td><pre>$linenumbers</pre></td><td><pre>$code></pre></td></tr></tbody></span></div></li> -<li><div class="src-line"><a name="a84"></a><span class="src-doc"> * <tfooter><tr><td colspan="2">$footer</td></tr></tfoot></span></div></li> -<li><div class="src-line"><a name="a85"></a><span class="src-doc"> * </table></span></div></li> -<li><div class="src-line"><a name="a86"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a87"></a><span class="src-doc"> * this is essentially only a workaround for Firefox, see sf#1651996 or take a look at</span></div></li> -<li><div class="src-line"><a name="a88"></a><span class="src-doc"> * https://bugzilla.mozilla.org/show_bug.cgi?id=365805</span></div></li> -<li><div class="src-line"><a name="a89"></a><span class="src-doc"> * </span><span class="src-doc-tag">@note</span><span class="src-doc"> when linenumbers are disabled this is essentially the same as GESHI_HEADER_PRE</span></div></li> -<li><div class="src-line"><a name="a90"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a91"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_HEADER_PRE_TABLE'</span><span class="src-sym">, </span><span class="src-num">4</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a92"></a> </div></li> -<li><div class="src-line"><a name="a93"></a><span class="src-comm">// Capatalisation constants</span></div></li> -<li><div class="src-line"><a name="a94"></a><span class="src-doc">/** Lowercase keywords found */</span></div></li> -<li><div class="src-line"><a name="a95"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_CAPS_NO_CHANGE'</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a96"></a><span class="src-doc">/** Uppercase keywords found */</span></div></li> -<li><div class="src-line"><a name="a97"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_CAPS_UPPER'</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a98"></a><span class="src-doc">/** Leave keywords found as the case that they are */</span></div></li> -<li><div class="src-line"><a name="a99"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_CAPS_LOWER'</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a100"></a> </div></li> -<li><div class="src-line"><a name="a101"></a><span class="src-comm">// Link style constants</span></div></li> -<li><div class="src-line"><a name="a102"></a><span class="src-doc">/** Links in the source in the :link state */</span></div></li> -<li><div class="src-line"><a name="a103"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_LINK'</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a104"></a><span class="src-doc">/** Links in the source in the :hover state */</span></div></li> -<li><div class="src-line"><a name="a105"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_HOVER'</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a106"></a><span class="src-doc">/** Links in the source in the :active state */</span></div></li> -<li><div class="src-line"><a name="a107"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_ACTIVE'</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a108"></a><span class="src-doc">/** Links in the source in the :visited state */</span></div></li> -<li><div class="src-line"><a name="a109"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_VISITED'</span><span class="src-sym">, </span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a110"></a> </div></li> -<li><div class="src-line"><a name="a111"></a><span class="src-comm">// Important string starter/finisher</span></div></li> -<li><div class="src-line"><a name="a112"></a><span class="src-comm">// Note that if you change these, they should be as-is: i.e., don't</span></div></li> -<li><div class="src-line"><a name="a113"></a><span class="src-comm">// write them as if they had been run through htmlentities()</span></div></li> -<li><div class="src-line"><a name="a114"></a><span class="src-doc">/** The starter for important parts of the source */</span></div></li> -<li><div class="src-line"><a name="a115"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_START_IMPORTANT'</span><span class="src-sym">, </span><span class="src-str">'<BEGIN GeSHi>'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a116"></a><span class="src-doc">/** The ender for important parts of the source */</span></div></li> -<li><div class="src-line"><a name="a117"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_END_IMPORTANT'</span><span class="src-sym">, </span><span class="src-str">'<END GeSHi>'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a118"></a> </div></li> -<li><div class="src-line"><a name="a119"></a><span class="src-comm">/**#@+</span></div></li> -<li><div class="src-line"><a name="a120"></a><span class="src-comm"> * @access private</span></div></li> -<li><div class="src-line"><a name="a121"></a><span class="src-comm"> */</span></div></li> -<li><div class="src-line"><a name="a122"></a><span class="src-comm">// When strict mode applies for a language</span></div></li> -<li><div class="src-line"><a name="a123"></a><span class="src-doc">/** Strict mode never applies (this is the most common) */</span></div></li> -<li><div class="src-line"><a name="a124"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NEVER'</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a125"></a><span class="src-doc">/** Strict mode *might* apply, and can be enabled or</span></div></li> -<li><div class="src-line"><a name="a126"></a><span class="src-doc"> disabled by </span><span class="src-doc-inlinetag">{@link GeSHi->enable_strict_mode()}</span><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a127"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_MAYBE'</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a128"></a><span class="src-doc">/** Strict mode always applies */</span></div></li> -<li><div class="src-line"><a name="a129"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_ALWAYS'</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a130"></a> </div></li> -<li><div class="src-line"><a name="a131"></a><span class="src-comm">// Advanced regexp handling constants, used in language files</span></div></li> -<li><div class="src-line"><a name="a132"></a><span class="src-doc">/** The key of the regex array defining what to search for */</span></div></li> -<li><div class="src-line"><a name="a133"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_SEARCH'</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a134"></a><span class="src-doc">/** The key of the regex array defining what bracket group in a</span></div></li> -<li><div class="src-line"><a name="a135"></a><span class="src-doc"> matched search to use as a replacement */</span></div></li> -<li><div class="src-line"><a name="a136"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_REPLACE'</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a137"></a><span class="src-doc">/** The key of the regex array defining any modifiers to the regular expression */</span></div></li> -<li><div class="src-line"><a name="a138"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_MODIFIERS'</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a139"></a><span class="src-doc">/** The key of the regex array defining what bracket group in a</span></div></li> -<li><div class="src-line"><a name="a140"></a><span class="src-doc"> matched search to put before the replacement */</span></div></li> -<li><div class="src-line"><a name="a141"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_BEFORE'</span><span class="src-sym">, </span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a142"></a><span class="src-doc">/** The key of the regex array defining what bracket group in a</span></div></li> -<li><div class="src-line"><a name="a143"></a><span class="src-doc"> matched search to put after the replacement */</span></div></li> -<li><div class="src-line"><a name="a144"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_AFTER'</span><span class="src-sym">, </span><span class="src-num">4</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a145"></a><span class="src-doc">/** The key of the regex array defining a custom keyword to use</span></div></li> -<li><div class="src-line"><a name="a146"></a><span class="src-doc"> for this regexp's html tag class */</span></div></li> -<li><div class="src-line"><a name="a147"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_CLASS'</span><span class="src-sym">, </span><span class="src-num">5</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a148"></a> </div></li> -<li><div class="src-line"><a name="a149"></a><span class="src-doc">/** Used in language files to mark comments */</span></div></li> -<li><div class="src-line"><a name="a150"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_COMMENTS'</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a151"></a> </div></li> -<li><div class="src-line"><a name="a152"></a><span class="src-doc">/** Used to work around missing PHP features **/</span></div></li> -<li><div class="src-line"><a name="a153"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_PHP_PRE_433'</span><span class="src-sym">, </span><span class="src-sym">!</span><span class="src-sym">(</span><span class="src-id">version_compare</span><span class="src-sym">(</span><span class="src-id">PHP_VERSION</span><span class="src-sym">, </span><span class="src-str">'4.3.3'</span><span class="src-sym">) </span>=== <span class="src-num">1</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a154"></a> </div></li> -<li><div class="src-line"><a name="a155"></a><span class="src-doc">/** make sure we can call stripos **/</span></div></li> -<li><div class="src-line"><a name="a156"></a><span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/function_exists">function_exists</a><span class="src-sym">(</span><span class="src-str">'stripos'</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a157"></a> <span class="src-comm">// the offset param of preg_match is not supported below PHP 4.3.3</span></div></li> -<li><div class="src-line"><a name="a158"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-id">GESHI_PHP_PRE_433</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a159"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a160"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@ignore</span></div></li> -<li><div class="src-line"><a name="a161"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a162"></a> <span class="src-key">function </span><a href="http://www.php.net/stripos">stripos</a><span class="src-sym">(</span><span class="src-var">$haystack</span><span class="src-sym">, </span><span class="src-var">$needle</span><span class="src-sym">, </span><span class="src-var">$offset </span>= <span class="src-id">null</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a163"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$offset</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a164"></a> <span class="src-var">$haystack </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$haystack</span><span class="src-sym">, </span><span class="src-var">$offset</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a165"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a166"></a> <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">'/'</span>. <a href="http://www.php.net/preg_quote">preg_quote</a><span class="src-sym">(</span><span class="src-var">$needle</span><span class="src-sym">, </span><span class="src-str">'/'</span><span class="src-sym">) </span>. <span class="src-str">'/'</span><span class="src-sym">, </span><span class="src-var">$haystack</span><span class="src-sym">, </span><span class="src-var">$match</span><span class="src-sym">, </span><span class="src-id">PREG_OFFSET_CAPTURE</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a167"></a> <span class="src-key">return </span><span class="src-var">$match</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a168"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a169"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a170"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a171"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a172"></a> <span class="src-key">else </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a173"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a174"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@ignore</span></div></li> -<li><div class="src-line"><a name="a175"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a176"></a> <span class="src-key">function </span><a href="http://www.php.net/stripos">stripos</a><span class="src-sym">(</span><span class="src-var">$haystack</span><span class="src-sym">, </span><span class="src-var">$needle</span><span class="src-sym">, </span><span class="src-var">$offset </span>= <span class="src-id">null</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a177"></a> <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">'/'</span>. <a href="http://www.php.net/preg_quote">preg_quote</a><span class="src-sym">(</span><span class="src-var">$needle</span><span class="src-sym">, </span><span class="src-str">'/'</span><span class="src-sym">) </span>. <span class="src-str">'/'</span><span class="src-sym">, </span><span class="src-var">$haystack</span><span class="src-sym">, </span><span class="src-var">$match</span><span class="src-sym">, </span><span class="src-id">PREG_OFFSET_CAPTURE</span><span class="src-sym">, </span><span class="src-var">$offset</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a178"></a> <span class="src-key">return </span><span class="src-var">$match</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a179"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a180"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a181"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a182"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a183"></a><span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a184"></a> </div></li> -<li><div class="src-line"><a name="a185"></a><span class="src-doc">/** some old PHP / PCRE subpatterns only support up to xxx subpatterns in</span></div></li> -<li><div class="src-line"><a name="a186"></a><span class="src-doc"> regular expressions. Set this to false if your PCRE lib is up to date</span></div></li> -<li><div class="src-line"><a name="a187"></a><span class="src-doc"> @see GeSHi->optimize_regexp_list()</span></div></li> -<li><div class="src-line"><a name="a188"></a><span class="src-doc"> **/</span></div></li> -<li><div class="src-line"><a name="a188"></a> </div></li> -<li><div class="src-line"><a name="a189"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_MAX_PCRE_SUBPATTERNS'</span><span class="src-sym">, </span><span class="src-num">500</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a190"></a><span class="src-doc">/** it's also important not to generate too long regular expressions</span></div></li> -<li><div class="src-line"><a name="a191"></a><span class="src-doc"> be generous here... but keep in mind, that when reaching this limit we</span></div></li> -<li><div class="src-line"><a name="a192"></a><span class="src-doc"> still have to close open patterns. 12k should do just fine on a 16k limit.</span></div></li> -<li><div class="src-line"><a name="a193"></a><span class="src-doc"> @see GeSHi->optimize_regexp_list()</span></div></li> -<li><div class="src-line"><a name="a194"></a><span class="src-doc"> **/</span></div></li> -<li><div class="src-line"><a name="a194"></a> </div></li> -<li><div class="src-line"><a name="a195"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_MAX_PCRE_LENGTH'</span><span class="src-sym">, </span><span class="src-num">12288</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a196"></a> </div></li> -<li><div class="src-line"><a name="a197"></a><span class="src-comm">//Number format specification</span></div></li> -<li><div class="src-line"><a name="a198"></a><span class="src-doc">/** Basic number format for integers */</span></div></li> -<li><div class="src-line"><a name="a199"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NUMBER_INT_BASIC'</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//Default integers \d+</span></div></li> -<li><div class="src-line"><a name="a200"></a><span class="src-doc">/** Enhanced number format for integers like seen in C */</span></div></li> -<li><div class="src-line"><a name="a201"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NUMBER_INT_CSTYLE'</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//Default C-Style \d+[lL]?</span></div></li> -<li><div class="src-line"><a name="a202"></a><span class="src-doc">/** Number format to highlight binary numbers with a suffix "b" */</span></div></li> -<li><div class="src-line"><a name="a203"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NUMBER_BIN_SUFFIX'</span><span class="src-sym">, </span><span class="src-num">16</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//[01]+[bB]</span></div></li> -<li><div class="src-line"><a name="a204"></a><span class="src-doc">/** Number format to highlight binary numbers with a prefix % */</span></div></li> -<li><div class="src-line"><a name="a205"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NUMBER_BIN_PREFIX_PERCENT'</span><span class="src-sym">, </span><span class="src-num">32</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//%[01]+</span></div></li> -<li><div class="src-line"><a name="a206"></a><span class="src-doc">/** Number format to highlight binary numbers with a prefix 0b (C) */</span></div></li> -<li><div class="src-line"><a name="a207"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NUMBER_BIN_PREFIX_0B'</span><span class="src-sym">, </span><span class="src-num">64</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//0b[01]+</span></div></li> -<li><div class="src-line"><a name="a208"></a><span class="src-doc">/** Number format to highlight octal numbers with a leading zero */</span></div></li> -<li><div class="src-line"><a name="a209"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NUMBER_OCT_PREFIX'</span><span class="src-sym">, </span><span class="src-num">256</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//0[0-7]+</span></div></li> -<li><div class="src-line"><a name="a210"></a><span class="src-doc">/** Number format to highlight octal numbers with a suffix of o */</span></div></li> -<li><div class="src-line"><a name="a211"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NUMBER_OCT_SUFFIX'</span><span class="src-sym">, </span><span class="src-num">512</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//[0-7]+[oO]</span></div></li> -<li><div class="src-line"><a name="a212"></a><span class="src-doc">/** Number format to highlight hex numbers with a prefix 0x */</span></div></li> -<li><div class="src-line"><a name="a213"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NUMBER_HEX_PREFIX'</span><span class="src-sym">, </span><span class="src-num">4096</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//0x[0-9a-fA-F]+</span></div></li> -<li><div class="src-line"><a name="a214"></a><span class="src-doc">/** Number format to highlight hex numbers with a suffix of h */</span></div></li> -<li><div class="src-line"><a name="a215"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NUMBER_HEX_SUFFIX'</span><span class="src-sym">, </span><span class="src-num">8192</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//[0-9][0-9a-fA-F]*h</span></div></li> -<li><div class="src-line"><a name="a216"></a><span class="src-doc">/** Number format to highlight floating-point numbers without support for scientific notation */</span></div></li> -<li><div class="src-line"><a name="a217"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NUMBER_FLT_NONSCI'</span><span class="src-sym">, </span><span class="src-num">65536</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//\d+\.\d+</span></div></li> -<li><div class="src-line"><a name="a218"></a><span class="src-doc">/** Number format to highlight floating-point numbers without support for scientific notation */</span></div></li> -<li><div class="src-line"><a name="a219"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NUMBER_FLT_NONSCI_F'</span><span class="src-sym">, </span><span class="src-num">131072</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//\d+(\.\d+)?f</span></div></li> -<li><div class="src-line"><a name="a220"></a><span class="src-doc">/** Number format to highlight floating-point numbers with support for scientific notation (E) and optional leading zero */</span></div></li> -<li><div class="src-line"><a name="a221"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NUMBER_FLT_SCI_SHORT'</span><span class="src-sym">, </span><span class="src-num">262144</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//\.\d+e\d+</span></div></li> -<li><div class="src-line"><a name="a222"></a><span class="src-doc">/** Number format to highlight floating-point numbers with support for scientific notation (E) and required leading digit */</span></div></li> -<li><div class="src-line"><a name="a223"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_NUMBER_FLT_SCI_ZERO'</span><span class="src-sym">, </span><span class="src-num">524288</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//\d+(\.\d+)?e\d+</span></div></li> -<li><div class="src-line"><a name="a224"></a><span class="src-comm">//Custom formats are passed by RX array</span></div></li> -<li><div class="src-line"><a name="a225"></a> </div></li> -<li><div class="src-line"><a name="a226"></a><span class="src-comm">// Error detection - use these to analyse faults</span></div></li> -<li><div class="src-line"><a name="a227"></a><span class="src-doc">/** No sourcecode to highlight was specified</span></div></li> -<li><div class="src-line"><a name="a228"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@deprecated</span></div></li> -<li><div class="src-line"><a name="a229"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a230"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_ERROR_NO_INPUT'</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a231"></a><span class="src-doc">/** The language specified does not exist */</span></div></li> -<li><div class="src-line"><a name="a232"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_ERROR_NO_SUCH_LANG'</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a233"></a><span class="src-doc">/** GeSHi could not open a file for reading (generally a language file) */</span></div></li> -<li><div class="src-line"><a name="a234"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_ERROR_FILE_NOT_READABLE'</span><span class="src-sym">, </span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a235"></a><span class="src-doc">/** The header type passed to </span><span class="src-doc-inlinetag">{@link GeSHi->set_header_type()}</span><span class="src-doc"> was invalid */</span></div></li> -<li><div class="src-line"><a name="a236"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_ERROR_INVALID_HEADER_TYPE'</span><span class="src-sym">, </span><span class="src-num">4</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a237"></a><span class="src-doc">/** The line number type passed to </span><span class="src-doc-inlinetag">{@link GeSHi->enable_line_numbers()}</span><span class="src-doc"> was invalid */</span></div></li> -<li><div class="src-line"><a name="a238"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'GESHI_ERROR_INVALID_LINE_NUMBER_TYPE'</span><span class="src-sym">, </span><span class="src-num">5</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a239"></a><span class="src-comm">/**#@-*/</span></div></li> -<li><div class="src-line"><a name="a240"></a> </div></li> -<li><div class="src-line"><a name="a241"></a> </div></li> -<li><div class="src-line"><a name="a242"></a><span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a243"></a><span class="src-doc"> * The GeSHi Class.</span></div></li> -<li><div class="src-line"><a name="a244"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a245"></a><span class="src-doc"> * Please refer to the documentation for GeSHi 1.0.X that is available</span></div></li> -<li><div class="src-line"><a name="a246"></a><span class="src-doc"> * at http://qbnz.com/highlighter/documentation.php for more information</span></div></li> -<li><div class="src-line"><a name="a247"></a><span class="src-doc"> * about how to use this class.</span></div></li> -<li><div class="src-line"><a name="a248"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a249"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> geshi</span></div></li> -<li><div class="src-line"><a name="a250"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Nigel McNie <nigel@geshi.org>, Benny Baumann <BenBE@omorphia.de></span></div></li> -<li><div class="src-line"><a name="a251"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2008 Benny Baumann</span></div></li> -<li><div class="src-line"><a name="a252"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a253"></a><span class="src-key">class </span><a href="../geshi/core/GeSHi.html">GeSHi</a> <span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a254"></a> <span class="src-comm">/**#@+</span></div></li> -<li><div class="src-line"><a name="a255"></a><span class="src-comm"> * @access private</span></div></li> -<li><div class="src-line"><a name="a256"></a><span class="src-comm"> */</span></div></li> -<li><div class="src-line"><a name="a257"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a258"></a><span class="src-doc"> * The source code to highlight</span></div></li> -<li><div class="src-line"><a name="a259"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a260"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a261"></a> <span class="src-key">var </span><span class="src-var">$source </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a262"></a> </div></li> -<li><div class="src-line"><a name="a263"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a264"></a><span class="src-doc"> * The language to use when highlighting</span></div></li> -<li><div class="src-line"><a name="a265"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a266"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a267"></a> <span class="src-key">var </span><span class="src-var">$language </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a268"></a> </div></li> -<li><div class="src-line"><a name="a269"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a270"></a><span class="src-doc"> * The data for the language used</span></div></li> -<li><div class="src-line"><a name="a271"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></div></li> -<li><div class="src-line"><a name="a272"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a273"></a> <span class="src-key">var </span><span class="src-var">$language_data </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a274"></a> </div></li> -<li><div class="src-line"><a name="a275"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a276"></a><span class="src-doc"> * The path to the language files</span></div></li> -<li><div class="src-line"><a name="a277"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a278"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a279"></a> <span class="src-key">var </span><span class="src-var">$language_path </span>= <span class="src-id">GESHI_LANG_ROOT</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a280"></a> </div></li> -<li><div class="src-line"><a name="a281"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a282"></a><span class="src-doc"> * The error message associated with an error</span></div></li> -<li><div class="src-line"><a name="a283"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a284"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> check err reporting works</span></div></li> -<li><div class="src-line"><a name="a285"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a286"></a> <span class="src-key">var </span><span class="src-var">$error </span>= <span class="src-id">false</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a287"></a> </div></li> -<li><div class="src-line"><a name="a288"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a289"></a><span class="src-doc"> * Possible error messages</span></div></li> -<li><div class="src-line"><a name="a290"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></div></li> -<li><div class="src-line"><a name="a291"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a292"></a> <span class="src-key">var </span><span class="src-var">$error_messages </span>= <span class="src-key">array</span><span class="src-sym">(</span></div></li> -<li><div class="src-line"><a name="a293"></a> <span class="src-id">GESHI_ERROR_NO_SUCH_LANG </span>=> <span class="src-str">'GeSHi could not find the language {LANGUAGE} (using path {PATH})'</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a294"></a> <span class="src-id">GESHI_ERROR_FILE_NOT_READABLE </span>=> <span class="src-str">'The file specified for load_from_file was not readable'</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a295"></a> <span class="src-id">GESHI_ERROR_INVALID_HEADER_TYPE </span>=> <span class="src-str">'The header type specified is invalid'</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a296"></a> <span class="src-id">GESHI_ERROR_INVALID_LINE_NUMBER_TYPE </span>=> <span class="src-str">'The line number type specified is invalid'</span></div></li> -<li><div class="src-line"><a name="a297"></a> <span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a298"></a> </div></li> -<li><div class="src-line"><a name="a299"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a300"></a><span class="src-doc"> * Whether highlighting is strict or not</span></div></li> -<li><div class="src-line"><a name="a301"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">boolean </span></div></li> -<li><div class="src-line"><a name="a302"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a303"></a> <span class="src-key">var </span><span class="src-var">$strict_mode </span>= <span class="src-id">false</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a304"></a> </div></li> -<li><div class="src-line"><a name="a305"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a306"></a><span class="src-doc"> * Whether to use CSS classes in output</span></div></li> -<li><div class="src-line"><a name="a307"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">boolean </span></div></li> -<li><div class="src-line"><a name="a308"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a309"></a> <span class="src-key">var </span><span class="src-var">$use_classes </span>= <span class="src-id">false</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a310"></a> </div></li> -<li><div class="src-line"><a name="a311"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a312"></a><span class="src-doc"> * The type of header to use. Can be one of the following</span></div></li> -<li><div class="src-line"><a name="a313"></a><span class="src-doc"> * values:</span></div></li> -<li><div class="src-line"><a name="a314"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a315"></a><span class="src-doc"> * - GESHI_HEADER_PRE: Source is outputted in a "pre" HTML element.</span></div></li> -<li><div class="src-line"><a name="a316"></a><span class="src-doc"> * - GESHI_HEADER_DIV: Source is outputted in a "div" HTML element.</span></div></li> -<li><div class="src-line"><a name="a317"></a><span class="src-doc"> * - GESHI_HEADER_NONE: No header is outputted.</span></div></li> -<li><div class="src-line"><a name="a318"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a319"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">int </span></div></li> -<li><div class="src-line"><a name="a320"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a321"></a> <span class="src-key">var </span><span class="src-var">$header_type </span>= <span class="src-id">GESHI_HEADER_PRE</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a322"></a> </div></li> -<li><div class="src-line"><a name="a323"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a324"></a><span class="src-doc"> * Array of permissions for which lexics should be highlighted</span></div></li> -<li><div class="src-line"><a name="a325"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></div></li> -<li><div class="src-line"><a name="a326"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a327"></a> <span class="src-key">var </span><span class="src-var">$lexic_permissions </span>= <span class="src-key">array</span><span class="src-sym">(</span></div></li> -<li><div class="src-line"><a name="a328"></a> <span class="src-str">'KEYWORDS' </span>=> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a329"></a> <span class="src-str">'COMMENTS' </span>=> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'MULTI' </span>=> <span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a330"></a> <span class="src-str">'REGEXPS' </span>=> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a331"></a> <span class="src-str">'ESCAPE_CHAR' </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a332"></a> <span class="src-str">'BRACKETS' </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a333"></a> <span class="src-str">'SYMBOLS' </span>=> <span class="src-id">false</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a334"></a> <span class="src-str">'STRINGS' </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a335"></a> <span class="src-str">'NUMBERS' </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a336"></a> <span class="src-str">'METHODS' </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a337"></a> <span class="src-str">'SCRIPT' </span>=> <span class="src-id">true</span></div></li> -<li><div class="src-line"><a name="a338"></a> <span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a339"></a> </div></li> -<li><div class="src-line"><a name="a340"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a341"></a><span class="src-doc"> * The time it took to parse the code</span></div></li> -<li><div class="src-line"><a name="a342"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">double </span></div></li> -<li><div class="src-line"><a name="a343"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a344"></a> <span class="src-key">var </span><span class="src-var">$time </span>= <span class="src-num">0</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a345"></a> </div></li> -<li><div class="src-line"><a name="a346"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a347"></a><span class="src-doc"> * The content of the header block</span></div></li> -<li><div class="src-line"><a name="a348"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a349"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a350"></a> <span class="src-key">var </span><span class="src-var">$header_content </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a351"></a> </div></li> -<li><div class="src-line"><a name="a352"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a353"></a><span class="src-doc"> * The content of the footer block</span></div></li> -<li><div class="src-line"><a name="a354"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a355"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a356"></a> <span class="src-key">var </span><span class="src-var">$footer_content </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a357"></a> </div></li> -<li><div class="src-line"><a name="a358"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a359"></a><span class="src-doc"> * The style of the header block</span></div></li> -<li><div class="src-line"><a name="a360"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a361"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a362"></a> <span class="src-key">var </span><span class="src-var">$header_content_style </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a363"></a> </div></li> -<li><div class="src-line"><a name="a364"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a365"></a><span class="src-doc"> * The style of the footer block</span></div></li> -<li><div class="src-line"><a name="a366"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a367"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a368"></a> <span class="src-key">var </span><span class="src-var">$footer_content_style </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a369"></a> </div></li> -<li><div class="src-line"><a name="a370"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a371"></a><span class="src-doc"> * Tells if a block around the highlighted source should be forced</span></div></li> -<li><div class="src-line"><a name="a372"></a><span class="src-doc"> * if not using line numbering</span></div></li> -<li><div class="src-line"><a name="a373"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">boolean </span></div></li> -<li><div class="src-line"><a name="a374"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a375"></a> <span class="src-key">var </span><span class="src-var">$force_code_block </span>= <span class="src-id">false</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a376"></a> </div></li> -<li><div class="src-line"><a name="a377"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a378"></a><span class="src-doc"> * The styles for hyperlinks in the code</span></div></li> -<li><div class="src-line"><a name="a379"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></div></li> -<li><div class="src-line"><a name="a380"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a381"></a> <span class="src-key">var </span><span class="src-var">$link_styles </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a382"></a> </div></li> -<li><div class="src-line"><a name="a383"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a384"></a><span class="src-doc"> * Whether important blocks should be recognised or not</span></div></li> -<li><div class="src-line"><a name="a385"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">boolean </span></div></li> -<li><div class="src-line"><a name="a386"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@deprecated</span></div></li> -<li><div class="src-line"><a name="a387"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> REMOVE THIS FUNCTIONALITY!</span></div></li> -<li><div class="src-line"><a name="a388"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a389"></a> <span class="src-key">var </span><span class="src-var">$enable_important_blocks </span>= <span class="src-id">false</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a390"></a> </div></li> -<li><div class="src-line"><a name="a391"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a392"></a><span class="src-doc"> * Styles for important parts of the code</span></div></li> -<li><div class="src-line"><a name="a393"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a394"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@deprecated</span></div></li> -<li><div class="src-line"><a name="a395"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> As above - rethink the whole idea of important blocks as it is buggy and</span></div></li> -<li><div class="src-line"><a name="a396"></a><span class="src-doc"> * will be hard to implement in 1.2</span></div></li> -<li><div class="src-line"><a name="a397"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a398"></a> <span class="src-key">var </span><span class="src-var">$important_styles </span>= <span class="src-str">'font-weight: bold; color: red;'</span><span class="src-sym">; </span><span class="src-comm">// Styles for important parts of the code</span></div></li> -<li><div class="src-line"><a name="a399"></a> </div></li> -<li><div class="src-line"><a name="a400"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a401"></a><span class="src-doc"> * Whether CSS IDs should be added to the code</span></div></li> -<li><div class="src-line"><a name="a402"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">boolean </span></div></li> -<li><div class="src-line"><a name="a403"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a404"></a> <span class="src-key">var </span><span class="src-var">$add_ids </span>= <span class="src-id">false</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a405"></a> </div></li> -<li><div class="src-line"><a name="a406"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a407"></a><span class="src-doc"> * Lines that should be highlighted extra</span></div></li> -<li><div class="src-line"><a name="a408"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></div></li> -<li><div class="src-line"><a name="a409"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a410"></a> <span class="src-key">var </span><span class="src-var">$highlight_extra_lines </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a411"></a> </div></li> -<li><div class="src-line"><a name="a412"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a413"></a><span class="src-doc"> * Styles of lines that should be highlighted extra</span></div></li> -<li><div class="src-line"><a name="a414"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></div></li> -<li><div class="src-line"><a name="a415"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a416"></a> <span class="src-key">var </span><span class="src-var">$highlight_extra_lines_styles </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a417"></a> </div></li> -<li><div class="src-line"><a name="a418"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a419"></a><span class="src-doc"> * Styles of extra-highlighted lines</span></div></li> -<li><div class="src-line"><a name="a420"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a421"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a422"></a> <span class="src-key">var </span><span class="src-var">$highlight_extra_lines_style </span>= <span class="src-str">'background-color: #ffc;'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a423"></a> </div></li> -<li><div class="src-line"><a name="a424"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a425"></a><span class="src-doc"> * The line ending</span></div></li> -<li><div class="src-line"><a name="a426"></a><span class="src-doc"> * If null, nl2br() will be used on the result string.</span></div></li> -<li><div class="src-line"><a name="a427"></a><span class="src-doc"> * Otherwise, all instances of \n will be replaced with $line_ending</span></div></li> -<li><div class="src-line"><a name="a428"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a429"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a430"></a> <span class="src-key">var </span><span class="src-var">$line_ending </span>= <span class="src-id">null</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a431"></a> </div></li> -<li><div class="src-line"><a name="a432"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a433"></a><span class="src-doc"> * Number at which line numbers should start at</span></div></li> -<li><div class="src-line"><a name="a434"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">int </span></div></li> -<li><div class="src-line"><a name="a435"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a436"></a> <span class="src-key">var </span><span class="src-var">$line_numbers_start </span>= <span class="src-num">1</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a437"></a> </div></li> -<li><div class="src-line"><a name="a438"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a439"></a><span class="src-doc"> * The overall style for this code block</span></div></li> -<li><div class="src-line"><a name="a440"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a441"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a442"></a> <span class="src-key">var </span><span class="src-var">$overall_style </span>= <span class="src-str">'font-family:monospace;'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a443"></a> </div></li> -<li><div class="src-line"><a name="a444"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a445"></a><span class="src-doc"> * The style for the actual code</span></div></li> -<li><div class="src-line"><a name="a446"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a447"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a448"></a> <span class="src-key">var </span><span class="src-var">$code_style </span>= <span class="src-str">'font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a449"></a> </div></li> -<li><div class="src-line"><a name="a450"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a451"></a><span class="src-doc"> * The overall class for this code block</span></div></li> -<li><div class="src-line"><a name="a452"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a453"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a454"></a> <span class="src-key">var </span><span class="src-var">$overall_class </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a455"></a> </div></li> -<li><div class="src-line"><a name="a456"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a457"></a><span class="src-doc"> * The overall ID for this code block</span></div></li> -<li><div class="src-line"><a name="a458"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a459"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a460"></a> <span class="src-key">var </span><span class="src-var">$overall_id </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a461"></a> </div></li> -<li><div class="src-line"><a name="a462"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a463"></a><span class="src-doc"> * Line number styles</span></div></li> -<li><div class="src-line"><a name="a464"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a465"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a466"></a> <span class="src-key">var </span><span class="src-var">$line_style1 </span>= <span class="src-str">'font-weight: normal; vertical-align:top;'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a467"></a> </div></li> -<li><div class="src-line"><a name="a468"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a469"></a><span class="src-doc"> * Line number styles for fancy lines</span></div></li> -<li><div class="src-line"><a name="a470"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a471"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a472"></a> <span class="src-key">var </span><span class="src-var">$line_style2 </span>= <span class="src-str">'font-weight: bold; vertical-align:top;'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a473"></a> </div></li> -<li><div class="src-line"><a name="a474"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a475"></a><span class="src-doc"> * Style for line numbers when GESHI_HEADER_PRE_TABLE is chosen</span></div></li> -<li><div class="src-line"><a name="a476"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a477"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a478"></a> <span class="src-key">var </span><span class="src-var">$table_linenumber_style </span>= <span class="src-str">'width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a479"></a> </div></li> -<li><div class="src-line"><a name="a480"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a481"></a><span class="src-doc"> * Flag for how line numbers are displayed</span></div></li> -<li><div class="src-line"><a name="a482"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">boolean </span></div></li> -<li><div class="src-line"><a name="a483"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a484"></a> <span class="src-key">var </span><span class="src-var">$line_numbers </span>= <span class="src-id">GESHI_NO_LINE_NUMBERS</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a485"></a> </div></li> -<li><div class="src-line"><a name="a486"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a487"></a><span class="src-doc"> * Flag to decide if multi line spans are allowed. Set it to false to make sure</span></div></li> -<li><div class="src-line"><a name="a488"></a><span class="src-doc"> * each tag is closed before and reopened after each linefeed.</span></div></li> -<li><div class="src-line"><a name="a489"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">boolean </span></div></li> -<li><div class="src-line"><a name="a490"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a491"></a> <span class="src-key">var </span><span class="src-var">$allow_multiline_span </span>= <span class="src-id">true</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a492"></a> </div></li> -<li><div class="src-line"><a name="a493"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a494"></a><span class="src-doc"> * The "nth" value for fancy line highlighting</span></div></li> -<li><div class="src-line"><a name="a495"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">int </span></div></li> -<li><div class="src-line"><a name="a496"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a497"></a> <span class="src-key">var </span><span class="src-var">$line_nth_row </span>= <span class="src-num">0</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a498"></a> </div></li> -<li><div class="src-line"><a name="a499"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a500"></a><span class="src-doc"> * The size of tab stops</span></div></li> -<li><div class="src-line"><a name="a501"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">int </span></div></li> -<li><div class="src-line"><a name="a502"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a503"></a> <span class="src-key">var </span><span class="src-var">$tab_width </span>= <span class="src-num">8</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a504"></a> </div></li> -<li><div class="src-line"><a name="a505"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a506"></a><span class="src-doc"> * Should we use language-defined tab stop widths?</span></div></li> -<li><div class="src-line"><a name="a507"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">int </span></div></li> -<li><div class="src-line"><a name="a508"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a509"></a> <span class="src-key">var </span><span class="src-var">$use_language_tab_width </span>= <span class="src-id">false</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a510"></a> </div></li> -<li><div class="src-line"><a name="a511"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a512"></a><span class="src-doc"> * Default target for keyword links</span></div></li> -<li><div class="src-line"><a name="a513"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a514"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a515"></a> <span class="src-key">var </span><span class="src-var">$link_target </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a516"></a> </div></li> -<li><div class="src-line"><a name="a517"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a518"></a><span class="src-doc"> * The encoding to use for entity encoding</span></div></li> -<li><div class="src-line"><a name="a519"></a><span class="src-doc"> * NOTE: Used with Escape Char Sequences to fix UTF-8 handling (cf. SF#2037598)</span></div></li> -<li><div class="src-line"><a name="a520"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a521"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a522"></a> <span class="src-key">var </span><span class="src-var">$encoding </span>= <span class="src-str">'utf-8'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a523"></a> </div></li> -<li><div class="src-line"><a name="a524"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a525"></a><span class="src-doc"> * Should keywords be linked?</span></div></li> -<li><div class="src-line"><a name="a526"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">boolean </span></div></li> -<li><div class="src-line"><a name="a527"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a528"></a> <span class="src-key">var </span><span class="src-var">$keyword_links </span>= <span class="src-id">true</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a529"></a> </div></li> -<li><div class="src-line"><a name="a530"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a531"></a><span class="src-doc"> * Currently loaded language file</span></div></li> -<li><div class="src-line"><a name="a532"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a533"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.7.22</span></div></li> -<li><div class="src-line"><a name="a534"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a535"></a> <span class="src-key">var </span><span class="src-var">$loaded_language </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a536"></a> </div></li> -<li><div class="src-line"><a name="a537"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a538"></a><span class="src-doc"> * Wether the caches needed for parsing are built or not</span></div></li> -<li><div class="src-line"><a name="a539"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a540"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">bool </span></div></li> -<li><div class="src-line"><a name="a541"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.8</span></div></li> -<li><div class="src-line"><a name="a542"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a543"></a> <span class="src-key">var </span><span class="src-var">$parse_cache_built </span>= <span class="src-id">false</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a544"></a> </div></li> -<li><div class="src-line"><a name="a545"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a546"></a><span class="src-doc"> * Work around for Suhosin Patch with disabled /e modifier</span></div></li> -<li><div class="src-line"><a name="a547"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a548"></a><span class="src-doc"> * Note from suhosins author in config file:</span></div></li> -<li><div class="src-line"><a name="a549"></a><span class="src-doc"> * <blockquote></span></div></li> -<li><div class="src-line"><a name="a550"></a><span class="src-doc"> * The /e modifier inside <code>preg_replace()</code> allows code execution.</span></div></li> -<li><div class="src-line"><a name="a551"></a><span class="src-doc"> * Often it is the cause for remote code execution exploits. It is wise to</span></div></li> -<li><div class="src-line"><a name="a552"></a><span class="src-doc"> * deactivate this feature and test where in the application it is used.</span></div></li> -<li><div class="src-line"><a name="a553"></a><span class="src-doc"> * The developer using the /e modifier should be made aware that he should</span></div></li> -<li><div class="src-line"><a name="a554"></a><span class="src-doc"> * use <code>preg_replace_callback()</code> instead</span></div></li> -<li><div class="src-line"><a name="a555"></a><span class="src-doc"> * </blockquote></span></div></li> -<li><div class="src-line"><a name="a556"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a557"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></div></li> -<li><div class="src-line"><a name="a558"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.8</span></div></li> -<li><div class="src-line"><a name="a559"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a560"></a> <span class="src-key">var </span><span class="src-var">$_kw_replace_group </span>= <span class="src-num">0</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a561"></a> <span class="src-key">var </span><span class="src-var">$_rx_key </span>= <span class="src-num">0</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a562"></a> </div></li> -<li><div class="src-line"><a name="a563"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a564"></a><span class="src-doc"> * some "callback parameters" for handle_multiline_regexps</span></div></li> -<li><div class="src-line"><a name="a565"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a566"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.8</span></div></li> -<li><div class="src-line"><a name="a567"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></div></li> -<li><div class="src-line"><a name="a568"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a569"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a570"></a> <span class="src-key">var </span><span class="src-var">$_hmr_before </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a571"></a> <span class="src-key">var </span><span class="src-var">$_hmr_replace </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a572"></a> <span class="src-key">var </span><span class="src-var">$_hmr_after </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a573"></a> <span class="src-key">var </span><span class="src-var">$_hmr_key </span>= <span class="src-num">0</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a574"></a> </div></li> -<li><div class="src-line"><a name="a575"></a> <span class="src-comm">/**#@-*/</span></div></li> -<li><div class="src-line"><a name="a576"></a> </div></li> -<li><div class="src-line"><a name="a577"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a578"></a><span class="src-doc"> * Creates a new GeSHi object, with source and language</span></div></li> -<li><div class="src-line"><a name="a579"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a580"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The source code to highlight</span></div></li> -<li><div class="src-line"><a name="a581"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The language to highlight the source with</span></div></li> -<li><div class="src-line"><a name="a582"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The path to the language file directory. <b>This</span></div></li> -<li><div class="src-line"><a name="a583"></a><span class="src-doc"> * is deprecated!</b> I've backported the auto path</span></div></li> -<li><div class="src-line"><a name="a584"></a><span class="src-doc"> * detection from the 1.1.X dev branch, so now it</span></div></li> -<li><div class="src-line"><a name="a585"></a><span class="src-doc"> * should be automatically set correctly. If you have</span></div></li> -<li><div class="src-line"><a name="a586"></a><span class="src-doc"> * renamed the language directory however, you will</span></div></li> -<li><div class="src-line"><a name="a587"></a><span class="src-doc"> * still need to set the path using this parameter or</span></div></li> -<li><div class="src-line"><a name="a588"></a><span class="src-doc"> * </span><span class="src-doc-inlinetag">{@link GeSHi->set_language_path()}</span></div></li> -<li><div class="src-line"><a name="a589"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a590"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a591"></a> <span class="src-key">function </span><a href="../geshi/core/GeSHi.html#methodGeSHi">GeSHi</a><span class="src-sym">(</span><span class="src-var">$source </span>= <span class="src-str">''</span><span class="src-sym">, </span><span class="src-var">$language </span>= <span class="src-str">''</span><span class="src-sym">, </span><span class="src-var">$path </span>= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a592"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$source</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a593"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodset_source">set_source</a><span class="src-sym">(</span><span class="src-var">$source</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a594"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a595"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$language</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a596"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodset_language">set_language</a><span class="src-sym">(</span><span class="src-var">$language</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a597"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a598"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodset_language_path">set_language_path</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a599"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a600"></a> </div></li> -<li><div class="src-line"><a name="a601"></a> <span class="src-doc">/**</span></div></li> -<li><div class="src-line"><a name="a602"></a><span class="src-doc"> * Returns an error message associated with the last GeSHi operation,</span></div></li> -<li><div class="src-line"><a name="a603"></a><span class="src-doc"> * or false if no error has occurred</span></div></li> -<li><div class="src-line"><a name="a604"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a605"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string</span><span class="src-doc">|</span><span class="src-doc-type">false</span><span class="src-doc">An error message if there has been an error, else false</span></div></li> -<li><div class="src-line"><a name="a606"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a607"></a><span class="src-doc"> */</span></div></li> -<li><div class="src-line"><a name="a608"></a> <span class="src-key">function </span><a href="../geshi/core/GeSHi.html#methoderror">error</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a609"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">error</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a610"></a> <span class="src-comm">//Put some template variables for debugging here ...</span></div></li> -<li><div class="src-line"><a name="a611"></a> <span class="src-var">$debug_tpl_vars </span>= <span class="src-key">array</span><span class="src-sym">(</span></div></li> -<li><div class="src-line"><a name="a612"></a> <span class="src-str">'{LANGUAGE}' </span>=> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a613"></a> <span class="src-str">'{PATH}' </span>=> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_path</span></div></li> -<li><div class="src-line"><a name="a614"></a> <span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a615"></a> <span class="src-var">$msg </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span></div></li> -<li><div class="src-line"><a name="a616"></a> <a href="http://www.php.net/array_keys">array_keys</a><span class="src-sym">(</span><span class="src-var">$debug_tpl_vars</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a617"></a> <a href="http://www.php.net/array_values">array_values</a><span class="src-sym">(</span><span class="src-var">$debug_tpl_vars</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a618"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">error_messages</span><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">error</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a619"></a> </div></li> -<li><div class="src-line"><a name="a620"></a> <span class="src-key">return </span><span class="src-str">"</span><span class="src-str"><br /><strong>GeSHi Error:</strong> <span class="src-var">$msg</span> (code {<span class="src-var">$this</span></span><span class="src-sym">-></span><span class="src-var">error</span><span class="src-sym">}</span>)<br /></span><span class="src-str"><span class="src-str">"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a621"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a622"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a623"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a624"></a> </div></li> -<li><div class="src-line"><a name="a625"></a></span><span class="src-str"> /**</span></div></li> -<li><div class="src-line"><a name="a626"></a></span><span class="src-str"> * Gets a human-readable language name (thanks to Simon Patterson</span></div></li> -<li><div class="src-line"><a name="a627"></a></span><span class="src-str"> * for the idea :))</span></div></li> -<li><div class="src-line"><a name="a628"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a629"></a></span><span class="src-str"> * @return string The name for the current language</span></div></li> -<li><div class="src-line"><a name="a630"></a></span><span class="src-str"> * @since 1.0.2</span></div></li> -<li><div class="src-line"><a name="a631"></a></span><span class="src-str"> */</span></div></li> -<li><div class="src-line"><a name="a632"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">get_language_name</span><span class="src-sym">(</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a633"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-id">GESHI_ERROR_NO_SUCH_LANG</span> == <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">error</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a634"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'LANG_NAME'</span><span class="src-sym">]</span> . <span class="src-str">' (Unknown Language)'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a635"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a636"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'LANG_NAME'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a637"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a638"></a> </div></li> -<li><div class="src-line"><a name="a639"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a640"></a><span class="src-doc"> * Sets the source code for this object</span></div></li> -<li><div class="src-line"><a name="a641"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a642"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The source code to highlight</span></div></li> -<li><div class="src-line"><a name="a643"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a644"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a645"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_source">set_source</a><span class="src-sym">(</span><span class="src-var">$source</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a646"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">source</span> = <span class="src-var">$source</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a647"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">highlight_extra_lines</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a648"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a649"></a> </div></li> -<li><div class="src-line"><a name="a650"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a651"></a><span class="src-doc"> * Sets the language for this object</span></div></li> -<li><div class="src-line"><a name="a652"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a653"></a><span class="src-doc"> * </span><span class="src-doc-tag">@note</span><span class="src-doc"> since 1.0.8 this function won't reset language-settings by default anymore!</span></div></li> -<li><div class="src-line"><a name="a654"></a><span class="src-doc"> * if you need this set $force_reset = true</span></div></li> -<li><div class="src-line"><a name="a655"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a656"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The name of the language to use</span></div></li> -<li><div class="src-line"><a name="a657"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a658"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a659"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_language">set_language</a><span class="src-sym">(</span><span class="src-var">$language</span><span class="src-sym">,</span> <span class="src-var">$force_reset</span> = <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a660"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$force_reset</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a661"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">loaded_language</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a662"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a663"></a> </div></li> -<li><div class="src-line"><a name="a664"></a></span><span class="src-str"> <span class="src-comm">//Clean up the language name to prevent malicious code injection</span></span></div></li> -<li><div class="src-line"><a name="a665"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$language</span> = <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'#[^a-zA-Z0-9\-_]#'</span><span class="src-sym">,</span> <span class="src-str">''</span><span class="src-sym">,</span> <span class="src-var">$language</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a666"></a> </div></li> -<li><div class="src-line"><a name="a667"></a></span><span class="src-str"> <span class="src-var">$language</span> = <a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$language</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a668"></a> </div></li> -<li><div class="src-line"><a name="a669"></a></span><span class="src-str"> <span class="src-comm">//Retreive the full filename</span></span></div></li> -<li><div class="src-line"><a name="a670"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$file_name</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_path</span> . <span class="src-var">$language</span> . <span class="src-str">'.php'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a671"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$file_name</span> == <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">loaded_language</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a672"></a></span><span class="src-str"> <span class="src-comm">// this language is already loaded!</span></span></div></li> -<li><div class="src-line"><a name="a673"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">return</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a674"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a675"></a> </div></li> -<li><div class="src-line"><a name="a676"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language</span> = <span class="src-var">$language</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a677"></a> </div></li> -<li><div class="src-line"><a name="a678"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">error</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a679"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">strict_mode</span> = <span class="src-id">GESHI_NEVER</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a680"></a> </div></li> -<li><div class="src-line"><a name="a681"></a></span><span class="src-str"> <span class="src-comm">//Check if we can read the desired file</span></span></div></li> -<li><div class="src-line"><a name="a682"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_readable">is_readable</a><span class="src-sym">(</span><span class="src-var">$file_name</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a683"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">error</span> = <span class="src-id">GESHI_ERROR_NO_SUCH_LANG</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a684"></a></span><span class="src-str"> <span class="src-key">return</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a685"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a686"></a> </div></li> -<li><div class="src-line"><a name="a687"></a></span><span class="src-str"> <span class="src-comm">// Load the language for parsing</span></span></div></li> -<li><div class="src-line"><a name="a688"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">load_language</span><span class="src-sym">(</span><span class="src-var">$file_name</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a689"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a690"></a> </div></li> -<li><div class="src-line"><a name="a691"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a692"></a><span class="src-doc"> * Sets the path to the directory containing the language files. Note</span></div></li> -<li><div class="src-line"><a name="a693"></a><span class="src-doc"> * that this path is relative to the directory of the script that included</span></div></li> -<li><div class="src-line"><a name="a694"></a><span class="src-doc"> * geshi.php, NOT geshi.php itself.</span></div></li> -<li><div class="src-line"><a name="a695"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a696"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The path to the language directory</span></div></li> -<li><div class="src-line"><a name="a697"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a698"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@deprecated</span><span class="src-doc"> The path to the language files should now be automatically</span></div></li> -<li><div class="src-line"><a name="a699"></a><span class="src-doc"> * detected, so this method should no longer be needed. The</span></div></li> -<li><div class="src-line"><a name="a700"></a><span class="src-doc"> * 1.1.X branch handles manual setting of the path differently</span></div></li> -<li><div class="src-line"><a name="a701"></a><span class="src-doc"> * so this method will disappear in 1.2.0.</span></div></li> -<li><div class="src-line"><a name="a702"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a703"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_language_path">set_language_path</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a704"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">,</span><span class="src-str">':'</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a705"></a></span><span class="src-str"> <span class="src-comm">//Security Fix to prevent external directories using fopen wrappers.</span></span></div></li> -<li><div class="src-line"><a name="a706"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-id">DIRECTORY_SEPARATOR</span> == <span class="src-str">"\\"</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a707"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">'#^[a-zA-Z]:#'</span><span class="src-sym">,</span> <span class="src-var">$path</span><span class="src-sym">)</span> || <span class="src-id">false</span> !== <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">,</span> <span class="src-str">':'</span><span class="src-sym">,</span> <span class="src-num">2</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a708"></a></span><span class="src-str"> <span class="src-key">return</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a709"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a710"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a711"></a></span><span class="src-str"> <span class="src-key">return</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a712"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a713"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a714"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">'#[^/a-zA-Z0-9_\.\-\\\s:]#'</span><span class="src-sym">,</span> <span class="src-var">$path</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a715"></a></span><span class="src-str"> <span class="src-comm">//Security Fix to prevent external directories using fopen wrappers.</span></span></div></li> -<li><div class="src-line"><a name="a716"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">return</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a717"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a718"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_SECURITY_PARANOID">GESHI_SECURITY_PARANOID</a></span> && <span class="src-id">false</span> !== <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">,</span> <span class="src-str">'/.'</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a719"></a></span><span class="src-str"> <span class="src-comm">//Security Fix to prevent external directories using fopen wrappers.</span></span></div></li> -<li><div class="src-line"><a name="a720"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">return</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a721"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a722"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_SECURITY_PARANOID">GESHI_SECURITY_PARANOID</a></span> && <span class="src-id">false</span> !== <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">,</span> <span class="src-str">'..'</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a723"></a></span><span class="src-str"> <span class="src-comm">//Security Fix to prevent external directories using fopen wrappers.</span></span></div></li> -<li><div class="src-line"><a name="a724"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">return</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a725"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a726"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a727"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_path</span> = <span class="src-sym">(</span><span class="src-str">'/'</span> == <span class="src-var">$path</span><span class="src-sym">[</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">)</span> - <span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span> ? <span class="src-var">$path</span> : <span class="src-var">$path</span> . <span class="src-str">'/'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a728"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodset_language">set_language</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language</span><span class="src-sym">)</span><span class="src-sym">;</span> <span class="src-comm">// otherwise set_language_path has no effect</span></span></div></li> -<li><div class="src-line"><a name="a729"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a730"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a731"></a> </div></li> -<li><div class="src-line"><a name="a732"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a733"></a><span class="src-doc"> * Sets the type of header to be used.</span></div></li> -<li><div class="src-line"><a name="a734"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a735"></a><span class="src-doc"> * If GESHI_HEADER_DIV is used, the code is surrounded in a "div".This</span></div></li> -<li><div class="src-line"><a name="a736"></a><span class="src-doc"> * means more source code but more control over tab width and line-wrapping.</span></div></li> -<li><div class="src-line"><a name="a737"></a><span class="src-doc"> * GESHI_HEADER_PRE means that a "pre" is used - less source, but less</span></div></li> -<li><div class="src-line"><a name="a738"></a><span class="src-doc"> * control. Default is GESHI_HEADER_PRE.</span></div></li> -<li><div class="src-line"><a name="a739"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a740"></a><span class="src-doc"> * From 1.0.7.2, you can use GESHI_HEADER_NONE to specify that no header code</span></div></li> -<li><div class="src-line"><a name="a741"></a><span class="src-doc"> * should be outputted.</span></div></li> -<li><div class="src-line"><a name="a742"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a743"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc">The type of header to be used</span></div></li> -<li><div class="src-line"><a name="a744"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a745"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a746"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_header_type">set_header_type</a><span class="src-sym">(</span><span class="src-var">$type</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a747"></a></span><span class="src-str"> <span class="src-comm">//Check if we got a valid header type</span></span></div></li> -<li><div class="src-line"><a name="a748"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/in_array">in_array</a><span class="src-sym">(</span><span class="src-var">$type</span><span class="src-sym">,</span> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_NONE">GESHI_HEADER_NONE</a></span><span class="src-sym">,</span> <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_DIV">GESHI_HEADER_DIV</a></span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a749"></a></span><span class="src-str"> <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE">GESHI_HEADER_PRE</a></span><span class="src-sym">,</span> <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_VALID">GESHI_HEADER_PRE_VALID</a></span><span class="src-sym">,</span> <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_TABLE">GESHI_HEADER_PRE_TABLE</a></span><span class="src-sym">)))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a750"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">error</span> = <span class="src-id">GESHI_ERROR_INVALID_HEADER_TYPE</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a751"></a></span><span class="src-str"> <span class="src-key">return</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a752"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a753"></a> </div></li> -<li><div class="src-line"><a name="a754"></a></span><span class="src-str"> <span class="src-comm">//Set that new header type</span></span></div></li> -<li><div class="src-line"><a name="a755"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">header_type</span> = <span class="src-var">$type</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a756"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a757"></a> </div></li> -<li><div class="src-line"><a name="a758"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a759"></a><span class="src-doc"> * Sets the styles for the code that will be outputted</span></div></li> -<li><div class="src-line"><a name="a760"></a><span class="src-doc"> * when this object is parsed. The style should be a</span></div></li> -<li><div class="src-line"><a name="a761"></a><span class="src-doc"> * string of valid stylesheet declarations</span></div></li> -<li><div class="src-line"><a name="a762"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a763"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc"> The overall style for the outputted code block</span></div></li> -<li><div class="src-line"><a name="a764"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to merge the styles with the current styles or not</span></div></li> -<li><div class="src-line"><a name="a765"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a766"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a767"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_overall_style">set_overall_style</a><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">,</span> <span class="src-var">$preserve_defaults</span> = <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a768"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$preserve_defaults</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a769"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">overall_style</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a770"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a771"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">overall_style</span> .= <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a772"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a773"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a774"></a> </div></li> -<li><div class="src-line"><a name="a775"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a776"></a><span class="src-doc"> * Sets the overall classname for this block of code. This</span></div></li> -<li><div class="src-line"><a name="a777"></a><span class="src-doc"> * class can then be used in a stylesheet to style this object's</span></div></li> -<li><div class="src-line"><a name="a778"></a><span class="src-doc"> * output</span></div></li> -<li><div class="src-line"><a name="a779"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a780"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The class name to use for this block of code</span></div></li> -<li><div class="src-line"><a name="a781"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a782"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a783"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_overall_class">set_overall_class</a><span class="src-sym">(</span><span class="src-var">$class</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a784"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">overall_class</span> = <span class="src-var">$class</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a785"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a786"></a> </div></li> -<li><div class="src-line"><a name="a787"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a788"></a><span class="src-doc"> * Sets the overall id for this block of code. This id can then</span></div></li> -<li><div class="src-line"><a name="a789"></a><span class="src-doc"> * be used in a stylesheet to style this object's output</span></div></li> -<li><div class="src-line"><a name="a790"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a791"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The ID to use for this block of code</span></div></li> -<li><div class="src-line"><a name="a792"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a793"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a794"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_overall_id">set_overall_id</a><span class="src-sym">(</span><span class="src-var">$id</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a795"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">overall_id</span> = <span class="src-var">$id</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a796"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a797"></a> </div></li> -<li><div class="src-line"><a name="a798"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a799"></a><span class="src-doc"> * Sets whether CSS classes should be used to highlight the source. Default</span></div></li> -<li><div class="src-line"><a name="a800"></a><span class="src-doc"> * is off, calling this method with no arguments will turn it on</span></div></li> -<li><div class="src-line"><a name="a801"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a802"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to turn classes on or not</span></div></li> -<li><div class="src-line"><a name="a803"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a804"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a805"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodenable_classes">enable_classes</a><span class="src-sym">(</span><span class="src-var">$flag</span> = <span class="src-id">true</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a806"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">use_classes</span> = <span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a807"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a808"></a> </div></li> -<li><div class="src-line"><a name="a809"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a810"></a><span class="src-doc"> * Sets the style for the actual code. This should be a string</span></div></li> -<li><div class="src-line"><a name="a811"></a><span class="src-doc"> * containing valid stylesheet declarations. If $preserve_defaults is</span></div></li> -<li><div class="src-line"><a name="a812"></a><span class="src-doc"> * true, then styles are merged with the default styles, with the</span></div></li> -<li><div class="src-line"><a name="a813"></a><span class="src-doc"> * user defined styles having priority</span></div></li> -<li><div class="src-line"><a name="a814"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a815"></a><span class="src-doc"> * Note: Use this method to override any style changes you made to</span></div></li> -<li><div class="src-line"><a name="a816"></a><span class="src-doc"> * the line numbers if you are using line numbers, else the line of</span></div></li> -<li><div class="src-line"><a name="a817"></a><span class="src-doc"> * code will have the same style as the line number! Consult the</span></div></li> -<li><div class="src-line"><a name="a818"></a><span class="src-doc"> * GeSHi documentation for more information about this.</span></div></li> -<li><div class="src-line"><a name="a819"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a820"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc"> The style to use for actual code</span></div></li> -<li><div class="src-line"><a name="a821"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to merge the current styles with the new styles</span></div></li> -<li><div class="src-line"><a name="a822"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a823"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a824"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_code_style">set_code_style</a><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">,</span> <span class="src-var">$preserve_defaults</span> = <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a825"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$preserve_defaults</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a826"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">code_style</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a827"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a828"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">code_style</span> .= <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a829"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a830"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a831"></a> </div></li> -<li><div class="src-line"><a name="a832"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a833"></a><span class="src-doc"> * Sets the styles for the line numbers.</span></div></li> -<li><div class="src-line"><a name="a834"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a835"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The style for the line numbers that are "normal"</span></div></li> -<li><div class="src-line"><a name="a836"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string</span><span class="src-doc">|</span><span class="src-doc-type">boolean</span><span class="src-doc">If a string, this is the style of the line</span></div></li> -<li><div class="src-line"><a name="a837"></a><span class="src-doc"> * numbers that are "fancy", otherwise if boolean then this</span></div></li> -<li><div class="src-line"><a name="a838"></a><span class="src-doc"> * defines whether the normal styles should be merged with the</span></div></li> -<li><div class="src-line"><a name="a839"></a><span class="src-doc"> * new normal styles or not</span></div></li> -<li><div class="src-line"><a name="a840"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">If set, is the flag for whether to merge the "fancy"</span></div></li> -<li><div class="src-line"><a name="a841"></a><span class="src-doc"> * styles with the current styles or not</span></div></li> -<li><div class="src-line"><a name="a842"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a843"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a844"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_line_style">set_line_style</a><span class="src-sym">(</span><span class="src-var">$style1</span><span class="src-sym">,</span> <span class="src-var">$style2</span> = <span class="src-str">''</span><span class="src-sym">,</span> <span class="src-var">$preserve_defaults</span> = <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a845"></a></span><span class="src-str"> <span class="src-comm">//Check if we got 2 or three parameters</span></span></div></li> -<li><div class="src-line"><a name="a846"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/is_bool">is_bool</a><span class="src-sym">(</span><span class="src-var">$style2</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a847"></a></span><span class="src-str"> <span class="src-var">$preserve_defaults</span> = <span class="src-var">$style2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a848"></a></span><span class="src-str"> <span class="src-var">$style2</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a849"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a850"></a> </div></li> -<li><div class="src-line"><a name="a851"></a></span><span class="src-str"> <span class="src-comm">//Actually set the new styles</span></span></div></li> -<li><div class="src-line"><a name="a852"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$preserve_defaults</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a853"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">line_style1</span> = <span class="src-var">$style1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a854"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">line_style2</span> = <span class="src-var">$style2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a855"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a856"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">line_style1</span> .= <span class="src-var">$style1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a857"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">line_style2</span> .= <span class="src-var">$style2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a858"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a859"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a860"></a> </div></li> -<li><div class="src-line"><a name="a861"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a862"></a><span class="src-doc"> * Sets whether line numbers should be displayed.</span></div></li> -<li><div class="src-line"><a name="a863"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a864"></a><span class="src-doc"> * Valid values for the first parameter are:</span></div></li> -<li><div class="src-line"><a name="a865"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a866"></a><span class="src-doc"> * - GESHI_NO_LINE_NUMBERS: Line numbers will not be displayed</span></div></li> -<li><div class="src-line"><a name="a867"></a><span class="src-doc"> * - GESHI_NORMAL_LINE_NUMBERS: Line numbers will be displayed</span></div></li> -<li><div class="src-line"><a name="a868"></a><span class="src-doc"> * - GESHI_FANCY_LINE_NUMBERS: Fancy line numbers will be displayed</span></div></li> -<li><div class="src-line"><a name="a869"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a870"></a><span class="src-doc"> * For fancy line numbers, the second parameter is used to signal which lines</span></div></li> -<li><div class="src-line"><a name="a871"></a><span class="src-doc"> * are to be fancy. For example, if the value of this parameter is 5 then every</span></div></li> -<li><div class="src-line"><a name="a872"></a><span class="src-doc"> * 5th line will be fancy.</span></div></li> -<li><div class="src-line"><a name="a873"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a874"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc">How line numbers should be displayed</span></div></li> -<li><div class="src-line"><a name="a875"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc">Defines which lines are fancy</span></div></li> -<li><div class="src-line"><a name="a876"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a877"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a878"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodenable_line_numbers">enable_line_numbers</a><span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">,</span> <span class="src-var">$nth_row</span> = <span class="src-num">5</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a879"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a></span> != <span class="src-var">$flag</span> && <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NORMAL_LINE_NUMBERS">GESHI_NORMAL_LINE_NUMBERS</a></span> != <span class="src-var">$flag</span></span></div></li> -<li><div class="src-line"><a name="a880"></a></span><span class="src-str"> && <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_FANCY_LINE_NUMBERS">GESHI_FANCY_LINE_NUMBERS</a></span> != <span class="src-var">$flag</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a881"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">error</span> = <span class="src-id">GESHI_ERROR_INVALID_LINE_NUMBER_TYPE</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a882"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a883"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">line_numbers</span> = <span class="src-var">$flag</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a884"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">line_nth_row</span> = <span class="src-var">$nth_row</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a885"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a886"></a> </div></li> -<li><div class="src-line"><a name="a887"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a888"></a><span class="src-doc"> * Sets wether spans and other HTML markup generated by GeSHi can</span></div></li> -<li><div class="src-line"><a name="a889"></a><span class="src-doc"> * span over multiple lines or not. Defaults to true to reduce overhead.</span></div></li> -<li><div class="src-line"><a name="a890"></a><span class="src-doc"> * Set it to false if you want to manipulate the output or manually display</span></div></li> -<li><div class="src-line"><a name="a891"></a><span class="src-doc"> * the code in an ordered list.</span></div></li> -<li><div class="src-line"><a name="a892"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a893"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Wether multiline spans are allowed or not</span></div></li> -<li><div class="src-line"><a name="a894"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.7.22</span></div></li> -<li><div class="src-line"><a name="a895"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a896"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodenable_multiline_span">enable_multiline_span</a><span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a897"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">allow_multiline_span</span> = (bool) <span class="src-var">$flag</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a898"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a899"></a> </div></li> -<li><div class="src-line"><a name="a900"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a901"></a><span class="src-doc"> * Get current setting for multiline spans, see GeSHi->enable_multiline_span().</span></div></li> -<li><div class="src-line"><a name="a902"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a903"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@see</span><span class="src-doc"> enable_multiline_span</span></div></li> -<li><div class="src-line"><a name="a904"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></div></li> -<li><div class="src-line"><a name="a905"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a906"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodget_multiline_span">get_multiline_span</a><span class="src-sym">(</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a907"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">allow_multiline_span</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a908"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a909"></a> </div></li> -<li><div class="src-line"><a name="a910"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a911"></a><span class="src-doc"> * Sets the style for a keyword group. If $preserve_defaults is</span></div></li> -<li><div class="src-line"><a name="a912"></a><span class="src-doc"> * true, then styles are merged with the default styles, with the</span></div></li> -<li><div class="src-line"><a name="a913"></a><span class="src-doc"> * user defined styles having priority</span></div></li> -<li><div class="src-line"><a name="a914"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a915"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc"> The key of the keyword group to change the styles of</span></div></li> -<li><div class="src-line"><a name="a916"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc"> The style to make the keywords</span></div></li> -<li><div class="src-line"><a name="a917"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to merge the new styles with the old or just</span></div></li> -<li><div class="src-line"><a name="a918"></a><span class="src-doc"> * to overwrite them</span></div></li> -<li><div class="src-line"><a name="a919"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a920"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a921"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_keyword_group_style">set_keyword_group_style</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,</span> <span class="src-var">$style</span><span class="src-sym">,</span> <span class="src-var">$preserve_defaults</span> = <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a922"></a></span><span class="src-str"> <span class="src-comm">//Set the style for this keyword group</span></span></div></li> -<li><div class="src-line"><a name="a923"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$preserve_defaults</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a924"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a925"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a926"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> .= <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a927"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a928"></a> </div></li> -<li><div class="src-line"><a name="a929"></a></span><span class="src-str"> <span class="src-comm">//Update the lexic permissions</span></span></div></li> -<li><div class="src-line"><a name="a930"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a931"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a932"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a933"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a934"></a> </div></li> -<li><div class="src-line"><a name="a935"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a936"></a><span class="src-doc"> * Turns highlighting on/off for a keyword group</span></div></li> -<li><div class="src-line"><a name="a937"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a938"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc"> The key of the keyword group to turn on or off</span></div></li> -<li><div class="src-line"><a name="a939"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to turn highlighting for that group on or off</span></div></li> -<li><div class="src-line"><a name="a940"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a941"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a942"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_keyword_group_highlighting">set_keyword_group_highlighting</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,</span> <span class="src-var">$flag</span> = <span class="src-id">true</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a943"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a944"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a945"></a> </div></li> -<li><div class="src-line"><a name="a946"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a947"></a><span class="src-doc"> * Sets the styles for comment groups. If $preserve_defaults is</span></div></li> -<li><div class="src-line"><a name="a948"></a><span class="src-doc"> * true, then styles are merged with the default styles, with the</span></div></li> -<li><div class="src-line"><a name="a949"></a><span class="src-doc"> * user defined styles having priority</span></div></li> -<li><div class="src-line"><a name="a950"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a951"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc"> The key of the comment group to change the styles of</span></div></li> -<li><div class="src-line"><a name="a952"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc"> The style to make the comments</span></div></li> -<li><div class="src-line"><a name="a953"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to merge the new styles with the old or just</span></div></li> -<li><div class="src-line"><a name="a954"></a><span class="src-doc"> * to overwrite them</span></div></li> -<li><div class="src-line"><a name="a955"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a956"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a957"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_comments_style">set_comments_style</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,</span> <span class="src-var">$style</span><span class="src-sym">,</span> <span class="src-var">$preserve_defaults</span> = <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a958"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$preserve_defaults</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a959"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a960"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a961"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> .= <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a962"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a963"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a964"></a> </div></li> -<li><div class="src-line"><a name="a965"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a966"></a><span class="src-doc"> * Turns highlighting on/off for comment groups</span></div></li> -<li><div class="src-line"><a name="a967"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a968"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc"> The key of the comment group to turn on or off</span></div></li> -<li><div class="src-line"><a name="a969"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to turn highlighting for that group on or off</span></div></li> -<li><div class="src-line"><a name="a970"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a971"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a972"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_comments_highlighting">set_comments_highlighting</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,</span> <span class="src-var">$flag</span> = <span class="src-id">true</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a973"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a974"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a975"></a> </div></li> -<li><div class="src-line"><a name="a976"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a977"></a><span class="src-doc"> * Sets the styles for escaped characters. If $preserve_defaults is</span></div></li> -<li><div class="src-line"><a name="a978"></a><span class="src-doc"> * true, then styles are merged with the default styles, with the</span></div></li> -<li><div class="src-line"><a name="a979"></a><span class="src-doc"> * user defined styles having priority</span></div></li> -<li><div class="src-line"><a name="a980"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a981"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc"> The style to make the escape characters</span></div></li> -<li><div class="src-line"><a name="a982"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to merge the new styles with the old or just</span></div></li> -<li><div class="src-line"><a name="a983"></a><span class="src-doc"> * to overwrite them</span></div></li> -<li><div class="src-line"><a name="a984"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a985"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a986"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_escape_characters_style">set_escape_characters_style</a><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">,</span> <span class="src-var">$preserve_defaults</span> = <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a987"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$preserve_defaults</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a988"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a989"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a990"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> .= <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a991"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a992"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a993"></a> </div></li> -<li><div class="src-line"><a name="a994"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a995"></a><span class="src-doc"> * Turns highlighting on/off for escaped characters</span></div></li> -<li><div class="src-line"><a name="a996"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a997"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to turn highlighting for escape characters on or off</span></div></li> -<li><div class="src-line"><a name="a998"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a999"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1000"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_escape_characters_highlighting">set_escape_characters_highlighting</a><span class="src-sym">(</span><span class="src-var">$flag</span> = <span class="src-id">true</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1001"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span> = <span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1002"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1003"></a> </div></li> -<li><div class="src-line"><a name="a1004"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1005"></a><span class="src-doc"> * Sets the styles for brackets. If $preserve_defaults is</span></div></li> -<li><div class="src-line"><a name="a1006"></a><span class="src-doc"> * true, then styles are merged with the default styles, with the</span></div></li> -<li><div class="src-line"><a name="a1007"></a><span class="src-doc"> * user defined styles having priority</span></div></li> -<li><div class="src-line"><a name="a1008"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1009"></a><span class="src-doc"> * This method is DEPRECATED: use set_symbols_style instead.</span></div></li> -<li><div class="src-line"><a name="a1010"></a><span class="src-doc"> * This method will be removed in 1.2.X</span></div></li> -<li><div class="src-line"><a name="a1011"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1012"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc"> The style to make the brackets</span></div></li> -<li><div class="src-line"><a name="a1013"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to merge the new styles with the old or just</span></div></li> -<li><div class="src-line"><a name="a1014"></a><span class="src-doc"> * to overwrite them</span></div></li> -<li><div class="src-line"><a name="a1015"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1016"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@deprecated</span><span class="src-doc"> In favour of set_symbols_style</span></div></li> -<li><div class="src-line"><a name="a1017"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1018"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_brackets_style">set_brackets_style</a><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">,</span> <span class="src-var">$preserve_defaults</span> = <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1019"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$preserve_defaults</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1020"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1021"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1022"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> .= <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1023"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1024"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1025"></a> </div></li> -<li><div class="src-line"><a name="a1026"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1027"></a><span class="src-doc"> * Turns highlighting on/off for brackets</span></div></li> -<li><div class="src-line"><a name="a1028"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1029"></a><span class="src-doc"> * This method is DEPRECATED: use set_symbols_highlighting instead.</span></div></li> -<li><div class="src-line"><a name="a1030"></a><span class="src-doc"> * This method will be remove in 1.2.X</span></div></li> -<li><div class="src-line"><a name="a1031"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1032"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to turn highlighting for brackets on or off</span></div></li> -<li><div class="src-line"><a name="a1033"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1034"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@deprecated</span><span class="src-doc"> In favour of set_symbols_highlighting</span></div></li> -<li><div class="src-line"><a name="a1035"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1036"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_brackets_highlighting">set_brackets_highlighting</a><span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1037"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">]</span> = <span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1038"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1039"></a> </div></li> -<li><div class="src-line"><a name="a1040"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1041"></a><span class="src-doc"> * Sets the styles for symbols. If $preserve_defaults is</span></div></li> -<li><div class="src-line"><a name="a1042"></a><span class="src-doc"> * true, then styles are merged with the default styles, with the</span></div></li> -<li><div class="src-line"><a name="a1043"></a><span class="src-doc"> * user defined styles having priority</span></div></li> -<li><div class="src-line"><a name="a1044"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1045"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc"> The style to make the symbols</span></div></li> -<li><div class="src-line"><a name="a1046"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to merge the new styles with the old or just</span></div></li> -<li><div class="src-line"><a name="a1047"></a><span class="src-doc"> * to overwrite them</span></div></li> -<li><div class="src-line"><a name="a1048"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc"> Tells the group of symbols for which style should be set.</span></div></li> -<li><div class="src-line"><a name="a1049"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.1</span></div></li> -<li><div class="src-line"><a name="a1050"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1051"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_symbols_style">set_symbols_style</a><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">,</span> <span class="src-var">$preserve_defaults</span> = <span class="src-id">false</span><span class="src-sym">,</span> <span class="src-var">$group</span> = <span class="src-num">0</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1052"></a></span><span class="src-str"> <span class="src-comm">// Update the style of symbols</span></span></div></li> -<li><div class="src-line"><a name="a1053"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$preserve_defaults</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1054"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'SYMBOLS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$group</span><span class="src-sym">]</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1055"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1056"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'SYMBOLS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$group</span><span class="src-sym">]</span> .= <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1057"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1058"></a> </div></li> -<li><div class="src-line"><a name="a1059"></a></span><span class="src-str"> <span class="src-comm">// For backward compatibility</span></span></div></li> -<li><div class="src-line"><a name="a1060"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-num">0</span> == <span class="src-var">$group</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1061"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodset_brackets_style">set_brackets_style</a> <span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">,</span> <span class="src-var">$preserve_defaults</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1062"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1063"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1064"></a> </div></li> -<li><div class="src-line"><a name="a1065"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1066"></a><span class="src-doc"> * Turns highlighting on/off for symbols</span></div></li> -<li><div class="src-line"><a name="a1067"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1068"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to turn highlighting for symbols on or off</span></div></li> -<li><div class="src-line"><a name="a1069"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1070"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1071"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_symbols_highlighting">set_symbols_highlighting</a><span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1072"></a></span><span class="src-str"> <span class="src-comm">// Update lexic permissions for this symbol group</span></span></div></li> -<li><div class="src-line"><a name="a1073"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'SYMBOLS'</span><span class="src-sym">]</span> = <span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1074"></a> </div></li> -<li><div class="src-line"><a name="a1075"></a></span><span class="src-str"> <span class="src-comm">// For backward compatibility</span></span></div></li> -<li><div class="src-line"><a name="a1076"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodset_brackets_highlighting">set_brackets_highlighting</a> <span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1077"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1078"></a> </div></li> -<li><div class="src-line"><a name="a1079"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1080"></a><span class="src-doc"> * Sets the styles for strings. If $preserve_defaults is</span></div></li> -<li><div class="src-line"><a name="a1081"></a><span class="src-doc"> * true, then styles are merged with the default styles, with the</span></div></li> -<li><div class="src-line"><a name="a1082"></a><span class="src-doc"> * user defined styles having priority</span></div></li> -<li><div class="src-line"><a name="a1083"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1084"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc"> The style to make the escape characters</span></div></li> -<li><div class="src-line"><a name="a1085"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to merge the new styles with the old or just</span></div></li> -<li><div class="src-line"><a name="a1086"></a><span class="src-doc"> * to overwrite them</span></div></li> -<li><div class="src-line"><a name="a1087"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1088"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1089"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_strings_style">set_strings_style</a><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">,</span> <span class="src-var">$preserve_defaults</span> = <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1090"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$preserve_defaults</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1091"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'STRINGS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1092"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1093"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'STRINGS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> .= <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1094"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1095"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1096"></a> </div></li> -<li><div class="src-line"><a name="a1097"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1098"></a><span class="src-doc"> * Turns highlighting on/off for strings</span></div></li> -<li><div class="src-line"><a name="a1099"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1100"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to turn highlighting for strings on or off</span></div></li> -<li><div class="src-line"><a name="a1101"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1102"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1103"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_strings_highlighting">set_strings_highlighting</a><span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1104"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'STRINGS'</span><span class="src-sym">]</span> = <span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1105"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1106"></a> </div></li> -<li><div class="src-line"><a name="a1107"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1108"></a><span class="src-doc"> * Sets the styles for numbers. If $preserve_defaults is</span></div></li> -<li><div class="src-line"><a name="a1109"></a><span class="src-doc"> * true, then styles are merged with the default styles, with the</span></div></li> -<li><div class="src-line"><a name="a1110"></a><span class="src-doc"> * user defined styles having priority</span></div></li> -<li><div class="src-line"><a name="a1111"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1112"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc"> The style to make the numbers</span></div></li> -<li><div class="src-line"><a name="a1113"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to merge the new styles with the old or just</span></div></li> -<li><div class="src-line"><a name="a1114"></a><span class="src-doc"> * to overwrite them</span></div></li> -<li><div class="src-line"><a name="a1115"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1116"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1117"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_numbers_style">set_numbers_style</a><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">,</span> <span class="src-var">$preserve_defaults</span> = <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1118"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$preserve_defaults</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1119"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1120"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1121"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> .= <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1122"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1123"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1124"></a> </div></li> -<li><div class="src-line"><a name="a1125"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1126"></a><span class="src-doc"> * Turns highlighting on/off for numbers</span></div></li> -<li><div class="src-line"><a name="a1127"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1128"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to turn highlighting for numbers on or off</span></div></li> -<li><div class="src-line"><a name="a1129"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1130"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1131"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_numbers_highlighting">set_numbers_highlighting</a><span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1132"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span> = <span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1133"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1134"></a> </div></li> -<li><div class="src-line"><a name="a1135"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1136"></a><span class="src-doc"> * Sets the styles for methods. $key is a number that references the</span></div></li> -<li><div class="src-line"><a name="a1137"></a><span class="src-doc"> * appropriate "object splitter" - see the language file for the language</span></div></li> -<li><div class="src-line"><a name="a1138"></a><span class="src-doc"> * you are highlighting to get this number. If $preserve_defaults is</span></div></li> -<li><div class="src-line"><a name="a1139"></a><span class="src-doc"> * true, then styles are merged with the default styles, with the</span></div></li> -<li><div class="src-line"><a name="a1140"></a><span class="src-doc"> * user defined styles having priority</span></div></li> -<li><div class="src-line"><a name="a1141"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1142"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc"> The key of the object splitter to change the styles of</span></div></li> -<li><div class="src-line"><a name="a1143"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc"> The style to make the methods</span></div></li> -<li><div class="src-line"><a name="a1144"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to merge the new styles with the old or just</span></div></li> -<li><div class="src-line"><a name="a1145"></a><span class="src-doc"> * to overwrite them</span></div></li> -<li><div class="src-line"><a name="a1146"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1147"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1148"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_methods_style">set_methods_style</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,</span> <span class="src-var">$style</span><span class="src-sym">,</span> <span class="src-var">$preserve_defaults</span> = <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1149"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$preserve_defaults</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1150"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'METHODS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1151"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1152"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'METHODS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> .= <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1153"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1154"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1155"></a> </div></li> -<li><div class="src-line"><a name="a1156"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1157"></a><span class="src-doc"> * Turns highlighting on/off for methods</span></div></li> -<li><div class="src-line"><a name="a1158"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1159"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to turn highlighting for methods on or off</span></div></li> -<li><div class="src-line"><a name="a1160"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1161"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1162"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_methods_highlighting">set_methods_highlighting</a><span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1163"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'METHODS'</span><span class="src-sym">]</span> = <span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1164"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1165"></a> </div></li> -<li><div class="src-line"><a name="a1166"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1167"></a><span class="src-doc"> * Sets the styles for regexps. If $preserve_defaults is</span></div></li> -<li><div class="src-line"><a name="a1168"></a><span class="src-doc"> * true, then styles are merged with the default styles, with the</span></div></li> -<li><div class="src-line"><a name="a1169"></a><span class="src-doc"> * user defined styles having priority</span></div></li> -<li><div class="src-line"><a name="a1170"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1171"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc"> The style to make the regular expression matches</span></div></li> -<li><div class="src-line"><a name="a1172"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to merge the new styles with the old or just</span></div></li> -<li><div class="src-line"><a name="a1173"></a><span class="src-doc"> * to overwrite them</span></div></li> -<li><div class="src-line"><a name="a1174"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1175"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1176"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_regexps_style">set_regexps_style</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,</span> <span class="src-var">$style</span><span class="src-sym">,</span> <span class="src-var">$preserve_defaults</span> = <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1177"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$preserve_defaults</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1178"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1179"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1180"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> .= <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1181"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1182"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1183"></a> </div></li> -<li><div class="src-line"><a name="a1184"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1185"></a><span class="src-doc"> * Turns highlighting on/off for regexps</span></div></li> -<li><div class="src-line"><a name="a1186"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1187"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc"> The key of the regular expression group to turn on or off</span></div></li> -<li><div class="src-line"><a name="a1188"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to turn highlighting for the regular expression group on or off</span></div></li> -<li><div class="src-line"><a name="a1189"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1190"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1191"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_regexps_highlighting">set_regexps_highlighting</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,</span> <span class="src-var">$flag</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1192"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1193"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1194"></a> </div></li> -<li><div class="src-line"><a name="a1195"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1196"></a><span class="src-doc"> * Sets whether a set of keywords are checked for in a case sensitive manner</span></div></li> -<li><div class="src-line"><a name="a1197"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1198"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc">The key of the keyword group to change the case sensitivity of</span></div></li> -<li><div class="src-line"><a name="a1199"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to check in a case sensitive manner or not</span></div></li> -<li><div class="src-line"><a name="a1200"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1201"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1202"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_case_sensitivity">set_case_sensitivity</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,</span> <span class="src-var">$case</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1203"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'CASE_SENSITIVE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-sym">(</span><span class="src-var">$case</span><span class="src-sym">)</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1204"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1205"></a> </div></li> -<li><div class="src-line"><a name="a1206"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1207"></a><span class="src-doc"> * Sets the case that keywords should use when found. Use the constants:</span></div></li> -<li><div class="src-line"><a name="a1208"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1209"></a><span class="src-doc"> * - GESHI_CAPS_NO_CHANGE: leave keywords as-is</span></div></li> -<li><div class="src-line"><a name="a1210"></a><span class="src-doc"> * - GESHI_CAPS_UPPER: convert all keywords to uppercase where found</span></div></li> -<li><div class="src-line"><a name="a1211"></a><span class="src-doc"> * - GESHI_CAPS_LOWER: convert all keywords to lowercase where found</span></div></li> -<li><div class="src-line"><a name="a1212"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1213"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc">A constant specifying what to do with matched keywords</span></div></li> -<li><div class="src-line"><a name="a1214"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.1</span></div></li> -<li><div class="src-line"><a name="a1215"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1216"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_case_keywords">set_case_keywords</a><span class="src-sym">(</span><span class="src-var">$case</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1217"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/in_array">in_array</a><span class="src-sym">(</span><span class="src-var">$case</span><span class="src-sym">,</span> <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a1218"></a></span><span class="src-str"> <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_CAPS_NO_CHANGE">GESHI_CAPS_NO_CHANGE</a></span><span class="src-sym">,</span> <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_CAPS_UPPER">GESHI_CAPS_UPPER</a></span><span class="src-sym">,</span> <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_CAPS_LOWER">GESHI_CAPS_LOWER</a></span><span class="src-sym">)))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1219"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'CASE_KEYWORDS'</span><span class="src-sym">]</span> = <span class="src-var">$case</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1220"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1221"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1222"></a> </div></li> -<li><div class="src-line"><a name="a1223"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1224"></a><span class="src-doc"> * Sets how many spaces a tab is substituted for</span></div></li> -<li><div class="src-line"><a name="a1225"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1226"></a><span class="src-doc"> * Widths below zero are ignored</span></div></li> -<li><div class="src-line"><a name="a1227"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1228"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc">The tab width</span></div></li> -<li><div class="src-line"><a name="a1229"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1230"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1231"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_tab_width">set_tab_width</a><span class="src-sym">(</span><span class="src-var">$width</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1232"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">tab_width</span> = <a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$width</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1233"></a> </div></li> -<li><div class="src-line"><a name="a1234"></a></span><span class="src-str"> <span class="src-comm">//Check if it fit's the constraints:</span></span></div></li> -<li><div class="src-line"><a name="a1235"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">tab_width</span> < <span class="src-num">1</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1236"></a></span><span class="src-str"> <span class="src-comm">//Return it to the default</span></span></div></li> -<li><div class="src-line"><a name="a1237"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">tab_width</span> = <span class="src-num">8</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1238"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1239"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1240"></a> </div></li> -<li><div class="src-line"><a name="a1241"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1242"></a><span class="src-doc"> * Sets whether or not to use tab-stop width specifed by language</span></div></li> -<li><div class="src-line"><a name="a1243"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1244"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to use language-specific tab-stop widths</span></div></li> -<li><div class="src-line"><a name="a1245"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.7.20</span></div></li> -<li><div class="src-line"><a name="a1246"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1247"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_use_language_tab_width">set_use_language_tab_width</a><span class="src-sym">(</span><span class="src-var">$use</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1248"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">use_language_tab_width</span> = (bool) <span class="src-var">$use</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1249"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1250"></a> </div></li> -<li><div class="src-line"><a name="a1251"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1252"></a><span class="src-doc"> * Returns the tab width to use, based on the current language and user</span></div></li> -<li><div class="src-line"><a name="a1253"></a><span class="src-doc"> * preference</span></div></li> -<li><div class="src-line"><a name="a1254"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1255"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">int </span><span class="src-doc">Tab width</span></div></li> -<li><div class="src-line"><a name="a1256"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.7.20</span></div></li> -<li><div class="src-line"><a name="a1257"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1258"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodget_real_tab_width">get_real_tab_width</a><span class="src-sym">(</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1259"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">use_language_tab_width</span> ||</span></div></li> -<li><div class="src-line"><a name="a1260"></a></span><span class="src-str"> <span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'TAB_WIDTH'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1261"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">tab_width</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1262"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1263"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'TAB_WIDTH'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1264"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1265"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1266"></a> </div></li> -<li><div class="src-line"><a name="a1267"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1268"></a><span class="src-doc"> * Enables/disables strict highlighting. Default is off, calling this</span></div></li> -<li><div class="src-line"><a name="a1269"></a><span class="src-doc"> * method without parameters will turn it on. See documentation</span></div></li> -<li><div class="src-line"><a name="a1270"></a><span class="src-doc"> * for more details on strict mode and where to use it.</span></div></li> -<li><div class="src-line"><a name="a1271"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1272"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether to enable strict mode or not</span></div></li> -<li><div class="src-line"><a name="a1273"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1274"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1275"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodenable_strict_mode">enable_strict_mode</a><span class="src-sym">(</span><span class="src-var">$mode</span> = <span class="src-id">true</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1276"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-id">GESHI_MAYBE</span> == <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STRICT_MODE_APPLIES'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1277"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">strict_mode</span> = <span class="src-sym">(</span><span class="src-var">$mode</span><span class="src-sym">)</span> ? <span class="src-id">GESHI_ALWAYS</span> : <span class="src-id">GESHI_NEVER</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1278"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1279"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1280"></a> </div></li> -<li><div class="src-line"><a name="a1281"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1282"></a><span class="src-doc"> * Disables all highlighting</span></div></li> -<li><div class="src-line"><a name="a1283"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1284"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1285"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Rewrite with array traversal</span></div></li> -<li><div class="src-line"><a name="a1286"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@deprecated</span><span class="src-doc"> In favour of enable_highlighting</span></div></li> -<li><div class="src-line"><a name="a1287"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1288"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methoddisable_highlighting">disable_highlighting</a><span class="src-sym">(</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1289"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodenable_highlighting">enable_highlighting</a><span class="src-sym">(</span><span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1290"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1291"></a> </div></li> -<li><div class="src-line"><a name="a1292"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1293"></a><span class="src-doc"> * Enables all highlighting</span></div></li> -<li><div class="src-line"><a name="a1294"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1295"></a><span class="src-doc"> * The optional flag parameter was added in version 1.0.7.21 and can be used</span></div></li> -<li><div class="src-line"><a name="a1296"></a><span class="src-doc"> * to enable (true) or disable (false) all highlighting.</span></div></li> -<li><div class="src-line"><a name="a1297"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1298"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1299"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">A flag specifying whether to enable or disable all highlighting</span></div></li> -<li><div class="src-line"><a name="a1300"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Rewrite with array traversal</span></div></li> -<li><div class="src-line"><a name="a1301"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1302"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodenable_highlighting">enable_highlighting</a><span class="src-sym">(</span><span class="src-var">$flag</span> = <span class="src-id">true</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1303"></a></span><span class="src-str"> <span class="src-var">$flag</span> = <span class="src-var">$flag</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1304"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span> <span class="src-key">as</span> <span class="src-var">$key</span> => <span class="src-var">$value</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1305"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1306"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$value</span> <span class="src-key">as</span> <span class="src-var">$k</span> => <span class="src-var">$v</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1307"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span> = <span class="src-var">$flag</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1308"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1309"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1310"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-var">$flag</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1311"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1312"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1313"></a> </div></li> -<li><div class="src-line"><a name="a1314"></a></span><span class="src-str"> <span class="src-comm">// Context blocks</span></span></div></li> -<li><div class="src-line"><a name="a1315"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">enable_important_blocks</span> = <span class="src-var">$flag</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1316"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1317"></a> </div></li> -<li><div class="src-line"><a name="a1318"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1319"></a><span class="src-doc"> * Given a file extension, this method returns either a valid geshi language</span></div></li> -<li><div class="src-line"><a name="a1320"></a><span class="src-doc"> * name, or the empty string if it couldn't be found</span></div></li> -<li><div class="src-line"><a name="a1321"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1322"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The extension to get a language name for</span></div></li> -<li><div class="src-line"><a name="a1323"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc"> A lookup array to use instead of the default one</span></div></li> -<li><div class="src-line"><a name="a1324"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.5</span></div></li> -<li><div class="src-line"><a name="a1325"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Re-think about how this method works (maybe make it private and/or make it</span></div></li> -<li><div class="src-line"><a name="a1326"></a><span class="src-doc"> * a extension->lang lookup?)</span></div></li> -<li><div class="src-line"><a name="a1327"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> static?</span></div></li> -<li><div class="src-line"><a name="a1328"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1329"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodget_language_name_from_extension">get_language_name_from_extension</a><span class="src-sym">(</span> <span class="src-var">$extension</span><span class="src-sym">,</span> <span class="src-var">$lookup</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span> <span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1330"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span> <span class="src-sym">!</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$lookup</span><span class="src-sym">)</span> || <span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$lookup</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1331"></a></span><span class="src-str"> <span class="src-var">$lookup</span> = <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a1332"></a></span><span class="src-str"> <span class="src-str">'actionscript'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'as'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1333"></a></span><span class="src-str"> <span class="src-str">'ada'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'a'</span><span class="src-sym">,</span> <span class="src-str">'ada'</span><span class="src-sym">,</span> <span class="src-str">'adb'</span><span class="src-sym">,</span> <span class="src-str">'ads'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1334"></a></span><span class="src-str"> <span class="src-str">'apache'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'conf'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1335"></a></span><span class="src-str"> <span class="src-str">'asm'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'ash'</span><span class="src-sym">,</span> <span class="src-str">'asm'</span><span class="src-sym">,</span> <span class="src-str">'inc'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1336"></a></span><span class="src-str"> <span class="src-str">'asp'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'asp'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1337"></a></span><span class="src-str"> <span class="src-str">'bash'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'sh'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1338"></a></span><span class="src-str"> <span class="src-str">'bf'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'bf'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1339"></a></span><span class="src-str"> <span class="src-str">'c'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'c'</span><span class="src-sym">,</span> <span class="src-str">'h'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1340"></a></span><span class="src-str"> <span class="src-str">'c_mac'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'c'</span><span class="src-sym">,</span> <span class="src-str">'h'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1341"></a></span><span class="src-str"> <span class="src-str">'caddcl'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1342"></a></span><span class="src-str"> <span class="src-str">'cadlisp'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1343"></a></span><span class="src-str"> <span class="src-str">'cdfg'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'cdfg'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1344"></a></span><span class="src-str"> <span class="src-str">'cobol'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'cbl'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1345"></a></span><span class="src-str"> <span class="src-str">'cpp'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'cpp'</span><span class="src-sym">,</span> <span class="src-str">'hpp'</span><span class="src-sym">,</span> <span class="src-str">'C'</span><span class="src-sym">,</span> <span class="src-str">'H'</span><span class="src-sym">,</span> <span class="src-str">'CPP'</span><span class="src-sym">,</span> <span class="src-str">'HPP'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1346"></a></span><span class="src-str"> <span class="src-str">'csharp'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'cs'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1347"></a></span><span class="src-str"> <span class="src-str">'css'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'css'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1348"></a></span><span class="src-str"> <span class="src-str">'d'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'d'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1349"></a></span><span class="src-str"> <span class="src-str">'delphi'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'dpk'</span><span class="src-sym">,</span> <span class="src-str">'dpr'</span><span class="src-sym">,</span> <span class="src-str">'pp'</span><span class="src-sym">,</span> <span class="src-str">'pas'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1350"></a></span><span class="src-str"> <span class="src-str">'diff'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'diff'</span><span class="src-sym">,</span> <span class="src-str">'patch'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1351"></a></span><span class="src-str"> <span class="src-str">'dos'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'bat'</span><span class="src-sym">,</span> <span class="src-str">'cmd'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1352"></a></span><span class="src-str"> <span class="src-str">'gettext'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'po'</span><span class="src-sym">,</span> <span class="src-str">'pot'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1353"></a></span><span class="src-str"> <span class="src-str">'gml'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'gml'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1354"></a></span><span class="src-str"> <span class="src-str">'gnuplot'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'plt'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1355"></a></span><span class="src-str"> <span class="src-str">'groovy'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'groovy'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1356"></a></span><span class="src-str"> <span class="src-str">'haskell'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'hs'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1357"></a></span><span class="src-str"> <span class="src-str">'html4strict'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'html'</span><span class="src-sym">,</span> <span class="src-str">'htm'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1358"></a></span><span class="src-str"> <span class="src-str">'ini'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'ini'</span><span class="src-sym">,</span> <span class="src-str">'desktop'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1359"></a></span><span class="src-str"> <span class="src-str">'java'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'java'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1360"></a></span><span class="src-str"> <span class="src-str">'javascript'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'js'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1361"></a></span><span class="src-str"> <span class="src-str">'klonec'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'kl1'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1362"></a></span><span class="src-str"> <span class="src-str">'klonecpp'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'klx'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1363"></a></span><span class="src-str"> <span class="src-str">'latex'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'tex'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1364"></a></span><span class="src-str"> <span class="src-str">'lisp'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'lisp'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1365"></a></span><span class="src-str"> <span class="src-str">'lua'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'lua'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1366"></a></span><span class="src-str"> <span class="src-str">'matlab'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'m'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1367"></a></span><span class="src-str"> <span class="src-str">'mpasm'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1368"></a></span><span class="src-str"> <span class="src-str">'mysql'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'sql'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1369"></a></span><span class="src-str"> <span class="src-str">'nsis'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1370"></a></span><span class="src-str"> <span class="src-str">'objc'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1371"></a></span><span class="src-str"> <span class="src-str">'oobas'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1372"></a></span><span class="src-str"> <span class="src-str">'oracle8'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1373"></a></span><span class="src-str"> <span class="src-str">'oracle10'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1374"></a></span><span class="src-str"> <span class="src-str">'pascal'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'pas'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1375"></a></span><span class="src-str"> <span class="src-str">'perl'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'pl'</span><span class="src-sym">,</span> <span class="src-str">'pm'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1376"></a></span><span class="src-str"> <span class="src-str">'php'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'php'</span><span class="src-sym">,</span> <span class="src-str">'php5'</span><span class="src-sym">,</span> <span class="src-str">'phtml'</span><span class="src-sym">,</span> <span class="src-str">'phps'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1377"></a></span><span class="src-str"> <span class="src-str">'povray'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'pov'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1378"></a></span><span class="src-str"> <span class="src-str">'providex'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'pvc'</span><span class="src-sym">,</span> <span class="src-str">'pvx'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1379"></a></span><span class="src-str"> <span class="src-str">'prolog'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'pl'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1380"></a></span><span class="src-str"> <span class="src-str">'python'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'py'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1381"></a></span><span class="src-str"> <span class="src-str">'qbasic'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'bi'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1382"></a></span><span class="src-str"> <span class="src-str">'reg'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'reg'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1383"></a></span><span class="src-str"> <span class="src-str">'ruby'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'rb'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1384"></a></span><span class="src-str"> <span class="src-str">'sas'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'sas'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1385"></a></span><span class="src-str"> <span class="src-str">'scala'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'scala'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1386"></a></span><span class="src-str"> <span class="src-str">'scheme'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'scm'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1387"></a></span><span class="src-str"> <span class="src-str">'scilab'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'sci'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1388"></a></span><span class="src-str"> <span class="src-str">'smalltalk'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'st'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1389"></a></span><span class="src-str"> <span class="src-str">'smarty'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1390"></a></span><span class="src-str"> <span class="src-str">'tcl'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'tcl'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1391"></a></span><span class="src-str"> <span class="src-str">'vb'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'bas'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1392"></a></span><span class="src-str"> <span class="src-str">'vbnet'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1393"></a></span><span class="src-str"> <span class="src-str">'visualfoxpro'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1394"></a></span><span class="src-str"> <span class="src-str">'whitespace'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'ws'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1395"></a></span><span class="src-str"> <span class="src-str">'xml'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'xml'</span><span class="src-sym">,</span> <span class="src-str">'svg'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1396"></a></span><span class="src-str"> <span class="src-str">'z80'</span> => <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'z80'</span><span class="src-sym">,</span> <span class="src-str">'asm'</span><span class="src-sym">,</span> <span class="src-str">'inc'</span><span class="src-sym">)</span></span></div></li> -<li><div class="src-line"><a name="a1397"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1398"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1399"></a> </div></li> -<li><div class="src-line"><a name="a1400"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$lookup</span> <span class="src-key">as</span> <span class="src-var">$lang</span> => <span class="src-var">$extensions</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1401"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/in_array">in_array</a><span class="src-sym">(</span><span class="src-var">$extension</span><span class="src-sym">,</span> <span class="src-var">$extensions</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1402"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$lang</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1403"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1404"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1405"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1406"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1407"></a> </div></li> -<li><div class="src-line"><a name="a1408"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1409"></a><span class="src-doc"> * Given a file name, this method loads its contents in, and attempts</span></div></li> -<li><div class="src-line"><a name="a1410"></a><span class="src-doc"> * to set the language automatically. An optional lookup table can be</span></div></li> -<li><div class="src-line"><a name="a1411"></a><span class="src-doc"> * passed for looking up the language name. If not specified a default</span></div></li> -<li><div class="src-line"><a name="a1412"></a><span class="src-doc"> * table is used</span></div></li> -<li><div class="src-line"><a name="a1413"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1414"></a><span class="src-doc"> * The language table is in the form</span></div></li> -<li><div class="src-line"><a name="a1415"></a><span class="src-doc"> * <pre>array(</span></div></li> -<li><div class="src-line"><a name="a1416"></a><span class="src-doc"> * 'lang_name' => array('extension', 'extension', ...),</span></div></li> -<li><div class="src-line"><a name="a1417"></a><span class="src-doc"> * 'lang_name' ...</span></div></li> -<li><div class="src-line"><a name="a1418"></a><span class="src-doc"> * );</pre></span></div></li> -<li><div class="src-line"><a name="a1419"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1420"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The filename to load the source from</span></div></li> -<li><div class="src-line"><a name="a1421"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc"> A lookup array to use instead of the default one</span></div></li> -<li><div class="src-line"><a name="a1422"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Complete rethink of this and above method</span></div></li> -<li><div class="src-line"><a name="a1423"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.5</span></div></li> -<li><div class="src-line"><a name="a1424"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1425"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodload_from_file">load_from_file</a><span class="src-sym">(</span><span class="src-var">$file_name</span><span class="src-sym">,</span> <span class="src-var">$lookup</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1426"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/is_readable">is_readable</a><span class="src-sym">(</span><span class="src-var">$file_name</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1427"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodset_source">set_source</a><span class="src-sym">(</span><a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-var">$file_name</span><span class="src-sym">))</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1428"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodset_language">set_language</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodget_language_name_from_extension">get_language_name_from_extension</a><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><a href="http://www.php.net/strrchr">strrchr</a><span class="src-sym">(</span><span class="src-var">$file_name</span><span class="src-sym">,</span> <span class="src-str">'.'</span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-var">$lookup</span><span class="src-sym">))</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1429"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1430"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">error</span> = <span class="src-id">GESHI_ERROR_FILE_NOT_READABLE</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1431"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1432"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1433"></a> </div></li> -<li><div class="src-line"><a name="a1434"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1435"></a><span class="src-doc"> * Adds a keyword to a keyword group for highlighting</span></div></li> -<li><div class="src-line"><a name="a1436"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1437"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc"> The key of the keyword group to add the keyword to</span></div></li> -<li><div class="src-line"><a name="a1438"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The word to add to the keyword group</span></div></li> -<li><div class="src-line"><a name="a1439"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1440"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1441"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodadd_keyword">add_keyword</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,</span> <span class="src-var">$word</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1442"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/in_array">in_array</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1443"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-var">$word</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1444"></a> </div></li> -<li><div class="src-line"><a name="a1445"></a></span><span class="src-str"> <span class="src-comm">//NEW in 1.0.8 don't recompile the whole optimized regexp, simply append it</span></span></div></li> -<li><div class="src-line"><a name="a1446"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">parse_cache_built</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1447"></a></span><span class="src-str"> <span class="src-var">$subkey</span> = <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'CACHED_KEYWORD_LISTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span> - <span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1448"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'CACHED_KEYWORD_LISTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$subkey</span><span class="src-sym">]</span> .= <span class="src-str">'|'</span> . <a href="http://www.php.net/preg_quote">preg_quote</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">,</span> <span class="src-str">'/'</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1449"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1450"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1451"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1452"></a> </div></li> -<li><div class="src-line"><a name="a1453"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1454"></a><span class="src-doc"> * Removes a keyword from a keyword group</span></div></li> -<li><div class="src-line"><a name="a1455"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1456"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc"> The key of the keyword group to remove the keyword from</span></div></li> -<li><div class="src-line"><a name="a1457"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The word to remove from the keyword group</span></div></li> -<li><div class="src-line"><a name="a1458"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">bool </span><span class="src-doc"> Wether to automatically recompile the optimized regexp list or not.</span></div></li> -<li><div class="src-line"><a name="a1459"></a><span class="src-doc"> * Note: if you set this to false and @see GeSHi->parse_code() was already called once,</span></div></li> -<li><div class="src-line"><a name="a1460"></a><span class="src-doc"> * for the current language, you have to manually call @see GeSHi->optimize_keyword_group()</span></div></li> -<li><div class="src-line"><a name="a1461"></a><span class="src-doc"> * or the removed keyword will stay in cache and still be highlighted! On the other hand</span></div></li> -<li><div class="src-line"><a name="a1462"></a><span class="src-doc"> * it might be too expensive to recompile the regexp list for every removal if you want to</span></div></li> -<li><div class="src-line"><a name="a1463"></a><span class="src-doc"> * remove a lot of keywords.</span></div></li> -<li><div class="src-line"><a name="a1464"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1465"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1466"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodremove_keyword">remove_keyword</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,</span> <span class="src-var">$word</span><span class="src-sym">,</span> <span class="src-var">$recompile</span> = <span class="src-id">true</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1467"></a></span><span class="src-str"> <span class="src-var">$key_to_remove</span> = <a href="http://www.php.net/array_search">array_search</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1468"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$key_to_remove</span> !== <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1469"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key_to_remove</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1470"></a> </div></li> -<li><div class="src-line"><a name="a1471"></a></span><span class="src-str"> <span class="src-comm">//NEW in 1.0.8, optionally recompile keyword group</span></span></div></li> -<li><div class="src-line"><a name="a1472"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$recompile</span> && <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">parse_cache_built</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1473"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodoptimize_keyword_group">optimize_keyword_group</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1474"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1475"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1476"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1477"></a> </div></li> -<li><div class="src-line"><a name="a1478"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1479"></a><span class="src-doc"> * Creates a new keyword group</span></div></li> -<li><div class="src-line"><a name="a1480"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1481"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc"> The key of the keyword group to create</span></div></li> -<li><div class="src-line"><a name="a1482"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The styles for the keyword group</span></div></li> -<li><div class="src-line"><a name="a1483"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Whether the keyword group is case sensitive ornot</span></div></li> -<li><div class="src-line"><a name="a1484"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc"> The words to use for the keyword group</span></div></li> -<li><div class="src-line"><a name="a1485"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1486"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1487"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodadd_keyword_group">add_keyword_group</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,</span> <span class="src-var">$styles</span><span class="src-sym">,</span> <span class="src-var">$case_sensitive</span> = <span class="src-id">true</span><span class="src-sym">,</span> <span class="src-var">$words</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1488"></a></span><span class="src-str"> <span class="src-var">$words</span> = (array) <span class="src-var">$words</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1489"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$words</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1490"></a></span><span class="src-str"> <span class="src-comm">// empty word lists mess up highlighting</span></span></div></li> -<li><div class="src-line"><a name="a1491"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">return</span> <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1492"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1493"></a> </div></li> -<li><div class="src-line"><a name="a1494"></a></span><span class="src-str"> <span class="src-comm">//Add the new keyword group internally</span></span></div></li> -<li><div class="src-line"><a name="a1495"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-var">$words</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1496"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1497"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'CASE_SENSITIVE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-var">$case_sensitive</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1498"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-var">$styles</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1499"></a> </div></li> -<li><div class="src-line"><a name="a1500"></a></span><span class="src-str"> <span class="src-comm">//NEW in 1.0.8, cache keyword regexp</span></span></div></li> -<li><div class="src-line"><a name="a1501"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">parse_cache_built</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1502"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodoptimize_keyword_group">optimize_keyword_group</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1503"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1504"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1505"></a> </div></li> -<li><div class="src-line"><a name="a1506"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1507"></a><span class="src-doc"> * Removes a keyword group</span></div></li> -<li><div class="src-line"><a name="a1508"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1509"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc"> The key of the keyword group to remove</span></div></li> -<li><div class="src-line"><a name="a1510"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1511"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1512"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodremove_keyword_group">remove_keyword_group</a> <span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1513"></a></span><span class="src-str"> <span class="src-comm">//Remove the keyword group internally</span></span></div></li> -<li><div class="src-line"><a name="a1514"></a></span><span class="src-str"><span class="src-comm"></span> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1515"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1516"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'CASE_SENSITIVE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1517"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1518"></a> </div></li> -<li><div class="src-line"><a name="a1519"></a></span><span class="src-str"> <span class="src-comm">//NEW in 1.0.8</span></span></div></li> -<li><div class="src-line"><a name="a1520"></a></span><span class="src-str"><span class="src-comm"></span> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'CACHED_KEYWORD_LISTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1521"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1522"></a> </div></li> -<li><div class="src-line"><a name="a1523"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1524"></a><span class="src-doc"> * compile optimized regexp list for keyword group</span></div></li> -<li><div class="src-line"><a name="a1525"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1526"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc"> The key of the keyword group to compile & optimize</span></div></li> -<li><div class="src-line"><a name="a1527"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.8</span></div></li> -<li><div class="src-line"><a name="a1528"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1529"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodoptimize_keyword_group">optimize_keyword_group</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1530"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'CACHED_KEYWORD_LISTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> =</span></div></li> -<li><div class="src-line"><a name="a1531"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">optimize_regexp_list</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1532"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1533"></a> </div></li> -<li><div class="src-line"><a name="a1534"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1535"></a><span class="src-doc"> * Sets the content of the header block</span></div></li> -<li><div class="src-line"><a name="a1536"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1537"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The content of the header block</span></div></li> -<li><div class="src-line"><a name="a1538"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1539"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1540"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_header_content">set_header_content</a><span class="src-sym">(</span><span class="src-var">$content</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1541"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">header_content</span> = <span class="src-var">$content</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1542"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1543"></a> </div></li> -<li><div class="src-line"><a name="a1544"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1545"></a><span class="src-doc"> * Sets the content of the footer block</span></div></li> -<li><div class="src-line"><a name="a1546"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1547"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The content of the footer block</span></div></li> -<li><div class="src-line"><a name="a1548"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1549"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1550"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_footer_content">set_footer_content</a><span class="src-sym">(</span><span class="src-var">$content</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1551"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">footer_content</span> = <span class="src-var">$content</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1552"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1553"></a> </div></li> -<li><div class="src-line"><a name="a1554"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1555"></a><span class="src-doc"> * Sets the style for the header content</span></div></li> -<li><div class="src-line"><a name="a1556"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1557"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The style for the header content</span></div></li> -<li><div class="src-line"><a name="a1558"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1559"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1560"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_header_content_style">set_header_content_style</a><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1561"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">header_content_style</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1562"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1563"></a> </div></li> -<li><div class="src-line"><a name="a1564"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1565"></a><span class="src-doc"> * Sets the style for the footer content</span></div></li> -<li><div class="src-line"><a name="a1566"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1567"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The style for the footer content</span></div></li> -<li><div class="src-line"><a name="a1568"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1569"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1570"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_footer_content_style">set_footer_content_style</a><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1571"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">footer_content_style</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1572"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1573"></a> </div></li> -<li><div class="src-line"><a name="a1574"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1575"></a><span class="src-doc"> * Sets whether to force a surrounding block around</span></div></li> -<li><div class="src-line"><a name="a1576"></a><span class="src-doc"> * the highlighted code or not</span></div></li> -<li><div class="src-line"><a name="a1577"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1578"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Tells whether to enable or disable this feature</span></div></li> -<li><div class="src-line"><a name="a1579"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.7.20</span></div></li> -<li><div class="src-line"><a name="a1580"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1581"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodenable_inner_code_block">enable_inner_code_block</a><span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1582"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">force_code_block</span> = (bool)<span class="src-var">$flag</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1583"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1584"></a> </div></li> -<li><div class="src-line"><a name="a1585"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1586"></a><span class="src-doc"> * Sets the base URL to be used for keywords</span></div></li> -<li><div class="src-line"><a name="a1587"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1588"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc">The key of the keyword group to set the URL for</span></div></li> -<li><div class="src-line"><a name="a1589"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The URL to set for the group. If {FNAME} is in</span></div></li> -<li><div class="src-line"><a name="a1590"></a><span class="src-doc"> * the url somewhere, it is replaced by the keyword</span></div></li> -<li><div class="src-line"><a name="a1591"></a><span class="src-doc"> * that the URL is being made for</span></div></li> -<li><div class="src-line"><a name="a1592"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1593"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1594"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_url_for_keyword_group">set_url_for_keyword_group</a><span class="src-sym">(</span><span class="src-var">$group</span><span class="src-sym">,</span> <span class="src-var">$url</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1595"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'URLS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$group</span><span class="src-sym">]</span> = <span class="src-var">$url</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1596"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1597"></a> </div></li> -<li><div class="src-line"><a name="a1598"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1599"></a><span class="src-doc"> * Sets styles for links in code</span></div></li> -<li><div class="src-line"><a name="a1600"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1601"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc">A constant that specifies what state the style is being</span></div></li> -<li><div class="src-line"><a name="a1602"></a><span class="src-doc"> * set for - e.g. :hover or :visited</span></div></li> -<li><div class="src-line"><a name="a1603"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The styles to use for that state</span></div></li> -<li><div class="src-line"><a name="a1604"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1605"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1606"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_link_styles">set_link_styles</a><span class="src-sym">(</span><span class="src-var">$type</span><span class="src-sym">,</span> <span class="src-var">$styles</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1607"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">link_styles</span><span class="src-sym">[</span><span class="src-var">$type</span><span class="src-sym">]</span> = <span class="src-var">$styles</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1608"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1609"></a> </div></li> -<li><div class="src-line"><a name="a1610"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1611"></a><span class="src-doc"> * Sets the target for links in code</span></div></li> -<li><div class="src-line"><a name="a1612"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1613"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The target for links in the code, e.g. _blank</span></div></li> -<li><div class="src-line"><a name="a1614"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.3</span></div></li> -<li><div class="src-line"><a name="a1615"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1616"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_link_target">set_link_target</a><span class="src-sym">(</span><span class="src-var">$target</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1617"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$target</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1618"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">link_target</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1619"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1620"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">link_target</span> = <span class="src-str">' target="'</span> . <span class="src-var">$target</span> . <span class="src-str">'" '</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1621"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1622"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1623"></a> </div></li> -<li><div class="src-line"><a name="a1624"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1625"></a><span class="src-doc"> * Sets styles for important parts of the code</span></div></li> -<li><div class="src-line"><a name="a1626"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1627"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The styles to use on important parts of the code</span></div></li> -<li><div class="src-line"><a name="a1628"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1629"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1630"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_important_styles">set_important_styles</a><span class="src-sym">(</span><span class="src-var">$styles</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1631"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">important_styles</span> = <span class="src-var">$styles</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1632"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1633"></a> </div></li> -<li><div class="src-line"><a name="a1634"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1635"></a><span class="src-doc"> * Sets whether context-important blocks are highlighted</span></div></li> -<li><div class="src-line"><a name="a1636"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1637"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">Tells whether to enable or disable highlighting of important blocks</span></div></li> -<li><div class="src-line"><a name="a1638"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> REMOVE THIS SHIZ FROM GESHI!</span></div></li> -<li><div class="src-line"><a name="a1639"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@deprecated</span></div></li> -<li><div class="src-line"><a name="a1640"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1641"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1642"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodenable_important_blocks">enable_important_blocks</a><span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1643"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">enable_important_blocks</span> = <span class="src-sym">(</span> <span class="src-var">$flag</span> <span class="src-sym">)</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1644"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1645"></a> </div></li> -<li><div class="src-line"><a name="a1646"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1647"></a><span class="src-doc"> * Whether CSS IDs should be added to each line</span></div></li> -<li><div class="src-line"><a name="a1648"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1649"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">If true, IDs will be added to each line.</span></div></li> -<li><div class="src-line"><a name="a1650"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1651"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1652"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodenable_ids">enable_ids</a><span class="src-sym">(</span><span class="src-var">$flag</span> = <span class="src-id">true</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1653"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">add_ids</span> = <span class="src-sym">(</span><span class="src-var">$flag</span><span class="src-sym">)</span> ? <span class="src-id">true</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1654"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1655"></a> </div></li> -<li><div class="src-line"><a name="a1656"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1657"></a><span class="src-doc"> * Specifies which lines to highlight extra</span></div></li> -<li><div class="src-line"><a name="a1658"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1659"></a><span class="src-doc"> * The extra style parameter was added in 1.0.7.21.</span></div></li> -<li><div class="src-line"><a name="a1660"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1661"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc">An array of line numbers to highlight, or just a line</span></div></li> -<li><div class="src-line"><a name="a1662"></a><span class="src-doc"> * number on its own.</span></div></li> -<li><div class="src-line"><a name="a1663"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">A string specifying the style to use for this line.</span></div></li> -<li><div class="src-line"><a name="a1664"></a><span class="src-doc"> * If null is specified, the default style is used.</span></div></li> -<li><div class="src-line"><a name="a1665"></a><span class="src-doc"> * If false is specified, the line will be removed from</span></div></li> -<li><div class="src-line"><a name="a1666"></a><span class="src-doc"> * special highlighting</span></div></li> -<li><div class="src-line"><a name="a1667"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1668"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Some data replication here that could be cut down on</span></div></li> -<li><div class="src-line"><a name="a1669"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1670"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodhighlight_lines_extra">highlight_lines_extra</a><span class="src-sym">(</span><span class="src-var">$lines</span><span class="src-sym">,</span> <span class="src-var">$style</span> = <span class="src-id">null</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1671"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$lines</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1672"></a></span><span class="src-str"> <span class="src-comm">//Split up the job using single lines at a time</span></span></div></li> -<li><div class="src-line"><a name="a1673"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$lines</span> <span class="src-key">as</span> <span class="src-var">$line</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1674"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodhighlight_lines_extra">highlight_lines_extra</a><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">,</span> <span class="src-var">$style</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1675"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1676"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1677"></a></span><span class="src-str"> <span class="src-comm">//Mark the line as being highlighted specially</span></span></div></li> -<li><div class="src-line"><a name="a1678"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$lines</span> = <a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$lines</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1679"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">highlight_extra_lines</span><span class="src-sym">[</span><span class="src-var">$lines</span><span class="src-sym">]</span> = <span class="src-var">$lines</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1680"></a> </div></li> -<li><div class="src-line"><a name="a1681"></a></span><span class="src-str"> <span class="src-comm">//Decide on which style to use</span></span></div></li> -<li><div class="src-line"><a name="a1682"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$style</span> === <span class="src-id">null</span><span class="src-sym">)</span> <span class="src-sym">{</span> <span class="src-comm">//Check if we should use default style</span></span></div></li> -<li><div class="src-line"><a name="a1683"></a></span><span class="src-str"><span class="src-comm"></span> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">highlight_extra_lines_styles</span><span class="src-sym">[</span><span class="src-var">$lines</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1684"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$style</span> === <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span> <span class="src-comm">//Check if to remove this line</span></span></div></li> -<li><div class="src-line"><a name="a1685"></a></span><span class="src-str"><span class="src-comm"></span> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">highlight_extra_lines</span><span class="src-sym">[</span><span class="src-var">$lines</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1686"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">highlight_extra_lines_styles</span><span class="src-sym">[</span><span class="src-var">$lines</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1687"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1688"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">highlight_extra_lines_styles</span><span class="src-sym">[</span><span class="src-var">$lines</span><span class="src-sym">]</span> = <span class="src-var">$style</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1689"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1690"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1691"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1692"></a> </div></li> -<li><div class="src-line"><a name="a1693"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1694"></a><span class="src-doc"> * Sets the style for extra-highlighted lines</span></div></li> -<li><div class="src-line"><a name="a1695"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1696"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The style for extra-highlighted lines</span></div></li> -<li><div class="src-line"><a name="a1697"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1698"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1699"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_highlight_lines_extra_style">set_highlight_lines_extra_style</a><span class="src-sym">(</span><span class="src-var">$styles</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1700"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">highlight_extra_lines_style</span> = <span class="src-var">$styles</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1701"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1702"></a> </div></li> -<li><div class="src-line"><a name="a1703"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1704"></a><span class="src-doc"> * Sets the line-ending</span></div></li> -<li><div class="src-line"><a name="a1705"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1706"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The new line-ending</span></div></li> -<li><div class="src-line"><a name="a1707"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1708"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1709"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_line_ending">set_line_ending</a><span class="src-sym">(</span><span class="src-var">$line_ending</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1710"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">line_ending</span> = (string)<span class="src-var">$line_ending</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1711"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1712"></a> </div></li> -<li><div class="src-line"><a name="a1713"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1714"></a><span class="src-doc"> * Sets what number line numbers should start at. Should</span></div></li> -<li><div class="src-line"><a name="a1715"></a><span class="src-doc"> * be a positive integer, and will be converted to one.</span></div></li> -<li><div class="src-line"><a name="a1716"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1717"></a><span class="src-doc"> * <b>Warning:</b> Using this method will add the "start"</span></div></li> -<li><div class="src-line"><a name="a1718"></a><span class="src-doc"> * attribute to the &lt;ol&gt; that is used for line numbering.</span></div></li> -<li><div class="src-line"><a name="a1719"></a><span class="src-doc"> * This is <b>not</b> valid XHTML strict, so if that's what you</span></div></li> -<li><div class="src-line"><a name="a1720"></a><span class="src-doc"> * care about then don't use this method. Firefox is getting</span></div></li> -<li><div class="src-line"><a name="a1721"></a><span class="src-doc"> * support for the CSS method of doing this in 1.1 and Opera</span></div></li> -<li><div class="src-line"><a name="a1722"></a><span class="src-doc"> * has support for the CSS method, but (of course) IE doesn't</span></div></li> -<li><div class="src-line"><a name="a1723"></a><span class="src-doc"> * so it's not worth doing it the CSS way yet.</span></div></li> -<li><div class="src-line"><a name="a1724"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1725"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc">The number to start line numbers at</span></div></li> -<li><div class="src-line"><a name="a1726"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1727"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1728"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodstart_line_numbers_at">start_line_numbers_at</a><span class="src-sym">(</span><span class="src-var">$number</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1729"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">line_numbers_start</span> = <a href="http://www.php.net/abs">abs</a><span class="src-sym">(</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$number</span><span class="src-sym">))</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1730"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1731"></a> </div></li> -<li><div class="src-line"><a name="a1732"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1733"></a><span class="src-doc"> * Sets the encoding used for htmlspecialchars(), for international</span></div></li> -<li><div class="src-line"><a name="a1734"></a><span class="src-doc"> * support.</span></div></li> -<li><div class="src-line"><a name="a1735"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1736"></a><span class="src-doc"> * NOTE: This is not needed for now because htmlspecialchars() is not</span></div></li> -<li><div class="src-line"><a name="a1737"></a><span class="src-doc"> * being used (it has a security hole in PHP4 that has not been patched).</span></div></li> -<li><div class="src-line"><a name="a1738"></a><span class="src-doc"> * Maybe in a future version it may make a return for speed reasons, but</span></div></li> -<li><div class="src-line"><a name="a1739"></a><span class="src-doc"> * I doubt it.</span></div></li> -<li><div class="src-line"><a name="a1740"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1741"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The encoding to use for the source</span></div></li> -<li><div class="src-line"><a name="a1742"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.3</span></div></li> -<li><div class="src-line"><a name="a1743"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1744"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodset_encoding">set_encoding</a><span class="src-sym">(</span><span class="src-var">$encoding</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1745"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$encoding</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1746"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">encoding</span> = <a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$encoding</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1747"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1748"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1749"></a> </div></li> -<li><div class="src-line"><a name="a1750"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1751"></a><span class="src-doc"> * Turns linking of keywords on or off.</span></div></li> -<li><div class="src-line"><a name="a1752"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1753"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc">If true, links will be added to keywords</span></div></li> -<li><div class="src-line"><a name="a1754"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.2</span></div></li> -<li><div class="src-line"><a name="a1755"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1756"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodenable_keyword_links">enable_keyword_links</a><span class="src-sym">(</span><span class="src-var">$enable</span> = <span class="src-id">true</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1757"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">keyword_links</span> = (bool) <span class="src-var">$enable</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1758"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1759"></a> </div></li> -<li><div class="src-line"><a name="a1760"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1761"></a><span class="src-doc"> * Setup caches needed for styling. This is automatically called in</span></div></li> -<li><div class="src-line"><a name="a1762"></a><span class="src-doc"> * parse_code() and get_stylesheet() when appropriate. This function helps</span></div></li> -<li><div class="src-line"><a name="a1763"></a><span class="src-doc"> * stylesheet generators as they rely on some style information being</span></div></li> -<li><div class="src-line"><a name="a1764"></a><span class="src-doc"> * preprocessed</span></div></li> -<li><div class="src-line"><a name="a1765"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1766"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.8</span></div></li> -<li><div class="src-line"><a name="a1767"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></div></li> -<li><div class="src-line"><a name="a1768"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1769"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">build_style_cache</span><span class="src-sym">(</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1770"></a></span><span class="src-str"> <span class="src-comm">//Build the style cache needed to highlight numbers appropriate</span></span></div></li> -<li><div class="src-line"><a name="a1771"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1772"></a></span><span class="src-str"> <span class="src-comm">//First check what way highlighting information for numbers are given</span></span></div></li> -<li><div class="src-line"><a name="a1773"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1774"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1775"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1776"></a> </div></li> -<li><div class="src-line"><a name="a1777"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1778"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS_CACHE'</span><span class="src-sym">]</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1779"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1780"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS_CACHE'</span><span class="src-sym">]</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1781"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1782"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span> =</span></div></li> -<li><div class="src-line"><a name="a1783"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_INT_BASIC</span> |</span></div></li> -<li><div class="src-line"><a name="a1784"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_FLT_NONSCI</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1785"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1786"></a> </div></li> -<li><div class="src-line"><a name="a1787"></a></span><span class="src-str"> <span class="src-key">for</span><span class="src-sym">(</span><span class="src-var">$i</span> = <span class="src-num">0</span><span class="src-sym">,</span> <span class="src-var">$j</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">;</span> <span class="src-var">$j</span> > <span class="src-num">0</span><span class="src-sym">;</span> ++<span class="src-var">$i</span><span class="src-sym">,</span> <span class="src-var">$j</span>>>=<span class="src-num">1</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1788"></a></span><span class="src-str"> <span class="src-comm">//Rearrange style indices if required ...</span></span></div></li> -<li><div class="src-line"><a name="a1789"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><<<span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1790"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span> =</span></div></li> -<li><div class="src-line"><a name="a1791"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><<<span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1792"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><<<span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1793"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1794"></a> </div></li> -<li><div class="src-line"><a name="a1795"></a></span><span class="src-str"> <span class="src-comm">//Check if this bit is set for highlighting</span></span></div></li> -<li><div class="src-line"><a name="a1796"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$j</span><span class="src-sym">&</span><span class="src-num">1</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1797"></a></span><span class="src-str"> <span class="src-comm">//So this bit is set ...</span></span></div></li> -<li><div class="src-line"><a name="a1798"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//Check if it belongs to group 0 or the actual stylegroup</span></span></div></li> -<li><div class="src-line"><a name="a1799"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1800"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS_CACHE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span> = <span class="src-num">1</span> << <span class="src-var">$i</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1801"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1802"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS_CACHE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1803"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS_CACHE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1804"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1805"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS_CACHE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> |= <span class="src-num">1</span> << <span class="src-var">$i</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1806"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1807"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1808"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1809"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1810"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1811"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1812"></a> </div></li> -<li><div class="src-line"><a name="a1813"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a1814"></a><span class="src-doc"> * Setup caches needed for parsing. This is automatically called in parse_code() when appropriate.</span></div></li> -<li><div class="src-line"><a name="a1815"></a><span class="src-doc"> * This function makes stylesheet generators much faster as they do not need these caches.</span></div></li> -<li><div class="src-line"><a name="a1816"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a1817"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.8</span></div></li> -<li><div class="src-line"><a name="a1818"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></div></li> -<li><div class="src-line"><a name="a1819"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a1820"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">build_parse_cache</span><span class="src-sym">(</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1821"></a></span><span class="src-str"> <span class="src-comm">// cache symbol regexp</span></span></div></li> -<li><div class="src-line"><a name="a1822"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//As this is a costy operation, we avoid doing it for multiple groups ...</span></span></div></li> -<li><div class="src-line"><a name="a1823"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//Instead we perform it for all symbols at once.</span></span></div></li> -<li><div class="src-line"><a name="a1824"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//</span></span></div></li> -<li><div class="src-line"><a name="a1825"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//For this to work, we need to reorganize the data arrays.</span></span></div></li> -<li><div class="src-line"><a name="a1826"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'SYMBOLS'</span><span class="src-sym">]</span> && <span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOLS'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1827"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'MULTIPLE_SYMBOL_GROUPS'</span><span class="src-sym">]</span> = <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'SYMBOLS'</span><span class="src-sym">]</span><span class="src-sym">)</span> > <span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1828"></a> </div></li> -<li><div class="src-line"><a name="a1829"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOL_DATA'</span><span class="src-sym">]</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1830"></a></span><span class="src-str"> <span class="src-var">$symbol_preg_multi</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span> <span class="src-comm">// multi char symbols</span></span></div></li> -<li><div class="src-line"><a name="a1831"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$symbol_preg_single</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span> <span class="src-comm">// single char symbols</span></span></div></li> -<li><div class="src-line"><a name="a1832"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOLS'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$key</span> => <span class="src-var">$symbols</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1833"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$symbols</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1834"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$symbols</span> <span class="src-key">as</span> <span class="src-var">$sym</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1835"></a></span><span class="src-str"> <span class="src-var">$sym</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$sym</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1836"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOL_DATA'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$sym</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1837"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOL_DATA'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$sym</span><span class="src-sym">]</span> = <span class="src-var">$key</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1838"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$sym</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span> <span class="src-comm">// multiple chars</span></span></div></li> -<li><div class="src-line"><a name="a1839"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$symbol_preg_multi</span><span class="src-sym">[</span><span class="src-sym">]</span> = <a href="http://www.php.net/preg_quote">preg_quote</a><span class="src-sym">(</span><span class="src-var">$sym</span><span class="src-sym">,</span> <span class="src-str">'/'</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1840"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span> <span class="src-comm">// single char</span></span></div></li> -<li><div class="src-line"><a name="a1841"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$sym</span> == <span class="src-str">'-'</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1842"></a></span><span class="src-str"> <span class="src-comm">// don't trigger range out of order error</span></span></div></li> -<li><div class="src-line"><a name="a1843"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$symbol_preg_single</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'\-'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1844"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1845"></a></span><span class="src-str"> <span class="src-var">$symbol_preg_single</span><span class="src-sym">[</span><span class="src-sym">]</span> = <a href="http://www.php.net/preg_quote">preg_quote</a><span class="src-sym">(</span><span class="src-var">$sym</span><span class="src-sym">,</span> <span class="src-str">'/'</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1846"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1847"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1848"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1849"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1850"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1851"></a></span><span class="src-str"> <span class="src-var">$symbols</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$symbols</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1852"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOL_DATA'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$symbols</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1853"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOL_DATA'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$symbols</span><span class="src-sym">]</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1854"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$symbols</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span> <span class="src-comm">// multiple chars</span></span></div></li> -<li><div class="src-line"><a name="a1855"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$symbol_preg_multi</span><span class="src-sym">[</span><span class="src-sym">]</span> = <a href="http://www.php.net/preg_quote">preg_quote</a><span class="src-sym">(</span><span class="src-var">$symbols</span><span class="src-sym">,</span> <span class="src-str">'/'</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1856"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$symbols</span> == <span class="src-str">'-'</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1857"></a></span><span class="src-str"> <span class="src-comm">// don't trigger range out of order error</span></span></div></li> -<li><div class="src-line"><a name="a1858"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$symbol_preg_single</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'\-'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1859"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span> <span class="src-comm">// single char</span></span></div></li> -<li><div class="src-line"><a name="a1860"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$symbol_preg_single</span><span class="src-sym">[</span><span class="src-sym">]</span> = <a href="http://www.php.net/preg_quote">preg_quote</a><span class="src-sym">(</span><span class="src-var">$symbols</span><span class="src-sym">,</span> <span class="src-str">'/'</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1861"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1862"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1863"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1864"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1865"></a> </div></li> -<li><div class="src-line"><a name="a1866"></a></span><span class="src-str"> <span class="src-comm">//Now we have an array with each possible symbol as the key and the style as the actual data.</span></span></div></li> -<li><div class="src-line"><a name="a1867"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//This way we can set the correct style just the moment we highlight ...</span></span></div></li> -<li><div class="src-line"><a name="a1868"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//</span></span></div></li> -<li><div class="src-line"><a name="a1869"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//Now we need to rewrite our array to get a search string that</span></span></div></li> -<li><div class="src-line"><a name="a1870"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$symbol_preg</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1871"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$symbol_preg_multi</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1872"></a></span><span class="src-str"> <a href="http://www.php.net/rsort">rsort</a><span class="src-sym">(</span><span class="src-var">$symbol_preg_multi</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1873"></a></span><span class="src-str"> <span class="src-var">$symbol_preg</span><span class="src-sym">[</span><span class="src-sym">]</span> = <a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">'|'</span><span class="src-sym">,</span> <span class="src-var">$symbol_preg_multi</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1874"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1875"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$symbol_preg_single</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1876"></a></span><span class="src-str"> <a href="http://www.php.net/rsort">rsort</a><span class="src-sym">(</span><span class="src-var">$symbol_preg_single</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1877"></a></span><span class="src-str"> <span class="src-var">$symbol_preg</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'['</span> . <a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">''</span><span class="src-sym">,</span> <span class="src-var">$symbol_preg_single</span><span class="src-sym">)</span> . <span class="src-str">']'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1878"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1879"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOL_SEARCH'</span><span class="src-sym">]</span> = <a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">"|"</span><span class="src-sym">,</span> <span class="src-var">$symbol_preg</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1880"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1881"></a> </div></li> -<li><div class="src-line"><a name="a1882"></a></span><span class="src-str"> <span class="src-comm">// cache optimized regexp for keyword matching</span></span></div></li> -<li><div class="src-line"><a name="a1883"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// remove old cache</span></span></div></li> -<li><div class="src-line"><a name="a1884"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'CACHED_KEYWORD_LISTS'</span><span class="src-sym">]</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1885"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><a href="http://www.php.net/array_keys">array_keys</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-key">as</span> <span class="src-var">$key</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1886"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span> ||</span></div></li> -<li><div class="src-line"><a name="a1887"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1888"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodoptimize_keyword_group">optimize_keyword_group</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1889"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1890"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1891"></a> </div></li> -<li><div class="src-line"><a name="a1892"></a></span><span class="src-str"> <span class="src-comm">// brackets</span></span></div></li> -<li><div class="src-line"><a name="a1893"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1894"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'CACHE_BRACKET_MATCH'</span><span class="src-sym">]</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'['</span><span class="src-sym">,</span> <span class="src-str">']'</span><span class="src-sym">,</span> <span class="src-str">'('</span><span class="src-sym">,</span> <span class="src-str">')'</span><span class="src-sym">,</span> <span class="src-str">'{'</span><span class="src-sym">,</span> <span class="src-str">'}'</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1895"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">use_classes</span> && isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1896"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'CACHE_BRACKET_REPLACE'</span><span class="src-sym">]</span> = <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a1897"></a></span><span class="src-str"> <span class="src-str">'<| style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> . <span class="src-str">'">&#91;|>'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1898"></a></span><span class="src-str"> <span class="src-str">'<| style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> . <span class="src-str">'">&#93;|>'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1899"></a></span><span class="src-str"> <span class="src-str">'<| style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> . <span class="src-str">'">&#40;|>'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1900"></a></span><span class="src-str"> <span class="src-str">'<| style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> . <span class="src-str">'">&#41;|>'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1901"></a></span><span class="src-str"> <span class="src-str">'<| style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> . <span class="src-str">'">&#123;|>'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1902"></a></span><span class="src-str"> <span class="src-str">'<| style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> . <span class="src-str">'">&#125;|>'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1903"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1904"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1905"></a></span><span class="src-str"> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1906"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'CACHE_BRACKET_REPLACE'</span><span class="src-sym">]</span> = <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a1907"></a></span><span class="src-str"> <span class="src-str">'<| class="br0">&#91;|>'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1908"></a></span><span class="src-str"> <span class="src-str">'<| class="br0">&#93;|>'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1909"></a></span><span class="src-str"> <span class="src-str">'<| class="br0">&#40;|>'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1910"></a></span><span class="src-str"> <span class="src-str">'<| class="br0">&#41;|>'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1911"></a></span><span class="src-str"> <span class="src-str">'<| class="br0">&#123;|>'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1912"></a></span><span class="src-str"> <span class="src-str">'<| class="br0">&#125;|>'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1913"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1914"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1915"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1916"></a> </div></li> -<li><div class="src-line"><a name="a1917"></a></span><span class="src-str"> <span class="src-comm">//Build the parse cache needed to highlight numbers appropriate</span></span></div></li> -<li><div class="src-line"><a name="a1918"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1919"></a></span><span class="src-str"> <span class="src-comm">//Check if the style rearrangements have been processed ...</span></span></div></li> -<li><div class="src-line"><a name="a1920"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//This also does some preprocessing to check which style groups are useable ...</span></span></div></li> -<li><div class="src-line"><a name="a1921"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS_CACHE'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1922"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">build_style_cache</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1923"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1924"></a> </div></li> -<li><div class="src-line"><a name="a1925"></a></span><span class="src-str"> <span class="src-comm">//Number format specification</span></span></div></li> -<li><div class="src-line"><a name="a1926"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//All this formats are matched case-insensitively!</span></span></div></li> -<li><div class="src-line"><a name="a1927"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">static</span> <span class="src-var">$numbers_format</span> = <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a1928"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_INT_BASIC</span> =></span></div></li> -<li><div class="src-line"><a name="a1929"></a></span><span class="src-str"> <span class="src-str">'(?<![0-9a-z_\.%])(?<![\d\.]e[+\-])([1-9]\d*?|0)(?![0-9a-z\.])'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1930"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_INT_CSTYLE</span> =></span></div></li> -<li><div class="src-line"><a name="a1931"></a></span><span class="src-str"> <span class="src-str">'(?<![0-9a-z_\.%])(?<![\d\.]e[+\-])([1-9]\d*?|0)l(?![0-9a-z\.])'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1932"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_BIN_SUFFIX</span> =></span></div></li> -<li><div class="src-line"><a name="a1933"></a></span><span class="src-str"> <span class="src-str">'(?<![0-9a-z_\.])(?<![\d\.]e[+\-])[01]+?b(?![0-9a-z\.])'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1934"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_BIN_PREFIX_PERCENT</span> =></span></div></li> -<li><div class="src-line"><a name="a1935"></a></span><span class="src-str"> <span class="src-str">'(?<![0-9a-z_\.%])(?<![\d\.]e[+\-])%[01]+?(?![0-9a-z\.])'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1936"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_BIN_PREFIX_0B</span> =></span></div></li> -<li><div class="src-line"><a name="a1937"></a></span><span class="src-str"> <span class="src-str">'(?<![0-9a-z_\.%])(?<![\d\.]e[+\-])0b[01]+?(?![0-9a-z\.])'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1938"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_OCT_PREFIX</span> =></span></div></li> -<li><div class="src-line"><a name="a1939"></a></span><span class="src-str"> <span class="src-str">'(?<![0-9a-z_\.])(?<![\d\.]e[+\-])0[0-7]+?(?![0-9a-z\.])'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1940"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_OCT_SUFFIX</span> =></span></div></li> -<li><div class="src-line"><a name="a1941"></a></span><span class="src-str"> <span class="src-str">'(?<![0-9a-z_\.])(?<![\d\.]e[+\-])[0-7]+?o(?![0-9a-z\.])'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1942"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_HEX_PREFIX</span> =></span></div></li> -<li><div class="src-line"><a name="a1943"></a></span><span class="src-str"> <span class="src-str">'(?<![0-9a-z_\.])(?<![\d\.]e[+\-])0x[0-9a-f]+?(?![0-9a-z\.])'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1944"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_HEX_SUFFIX</span> =></span></div></li> -<li><div class="src-line"><a name="a1945"></a></span><span class="src-str"> <span class="src-str">'(?<![0-9a-z_\.])(?<![\d\.]e[+\-])\d[0-9a-f]*?h(?![0-9a-z\.])'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1946"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_FLT_NONSCI</span> =></span></div></li> -<li><div class="src-line"><a name="a1947"></a></span><span class="src-str"> <span class="src-str">'(?<![0-9a-z_\.])(?<![\d\.]e[+\-])\d+?\.\d+?(?![0-9a-z\.])'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1948"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_FLT_NONSCI_F</span> =></span></div></li> -<li><div class="src-line"><a name="a1949"></a></span><span class="src-str"> <span class="src-str">'(?<![0-9a-z_\.])(?<![\d\.]e[+\-])(?:\d+?(?:\.\d*?)?|\.\d+?)f(?![0-9a-z\.])'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1950"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_FLT_SCI_SHORT</span> =></span></div></li> -<li><div class="src-line"><a name="a1951"></a></span><span class="src-str"> <span class="src-str">'(?<![0-9a-z_\.])(?<![\d\.]e[+\-])\.\d+?(?:e[+\-]?\d+?)?(?![0-9a-z\.])'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a1952"></a></span><span class="src-str"> <span class="src-id">GESHI_NUMBER_FLT_SCI_ZERO</span> =></span></div></li> -<li><div class="src-line"><a name="a1953"></a></span><span class="src-str"> <span class="src-str">'(?<![0-9a-z_\.])(?<![\d\.]e[+\-])(?:\d+?(?:\.\d*?)?|\.\d+?)(?:e[+\-]?\d+?)?(?![0-9a-z\.])'</span></span></div></li> -<li><div class="src-line"><a name="a1954"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1955"></a> </div></li> -<li><div class="src-line"><a name="a1956"></a></span><span class="src-str"> <span class="src-comm">//At this step we have an associative array with flag groups for a</span></span></div></li> -<li><div class="src-line"><a name="a1957"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//specific style or an string denoting a regexp given its index.</span></span></div></li> -<li><div class="src-line"><a name="a1958"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS_RXCACHE'</span><span class="src-sym">]</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1959"></a></span><span class="src-str"> <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS_CACHE'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$key</span> => <span class="src-var">$rxdata</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1960"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-id">is_string</span><span class="src-sym">(</span><span class="src-var">$rxdata</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1961"></a></span><span class="src-str"> <span class="src-var">$regexp</span> = <span class="src-var">$rxdata</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1962"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1963"></a></span><span class="src-str"> <span class="src-comm">//This is a bitfield of number flags to highlight:</span></span></div></li> -<li><div class="src-line"><a name="a1964"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//Build an array, implode them together and make this the actual RX</span></span></div></li> -<li><div class="src-line"><a name="a1965"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$rxuse</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1966"></a></span><span class="src-str"> <span class="src-key">for</span><span class="src-sym">(</span><span class="src-var">$i</span> = <span class="src-num">1</span><span class="src-sym">;</span> <span class="src-var">$i</span> <= <span class="src-var">$rxdata</span><span class="src-sym">;</span> <span class="src-var">$i</span><<=<span class="src-num">1</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1967"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$rxdata</span> <span class="src-sym">&</span> <span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1968"></a></span><span class="src-str"> <span class="src-var">$rxuse</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-var">$numbers_format</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1969"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1970"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1971"></a></span><span class="src-str"> <span class="src-var">$regexp</span> = <a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">"|"</span><span class="src-sym">,</span> <span class="src-var">$rxuse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1972"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1973"></a> </div></li> -<li><div class="src-line"><a name="a1974"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS_RXCACHE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> =</span></div></li> -<li><div class="src-line"><a name="a1975"></a></span><span class="src-str"> <span class="src-str">"</span></span>/(?<!<\|\/NUM!)(?<!\d\/>)(<span class="src-var">$regexp</span>)(?!\|>)/i<span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1976"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1977"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1978"></a> </div></li> -<li><div class="src-line"><a name="a1979"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">parse_cache_built</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1980"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a1981"></a> </div></li> -<li><div class="src-line"><a name="a1982"></a></span><span class="src-str"> /**</span></div></li> -<li><div class="src-line"><a name="a1983"></a></span><span class="src-str"> * Returns the code in $this->source, highlighted and surrounded by the</span></div></li> -<li><div class="src-line"><a name="a1984"></a></span><span class="src-str"> * nessecary HTML.</span></div></li> -<li><div class="src-line"><a name="a1985"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a1986"></a></span><span class="src-str"> * This should only be called ONCE, cos it's SLOW! If you want to highlight</span></div></li> -<li><div class="src-line"><a name="a1987"></a></span><span class="src-str"> * the same source multiple times, you're better off doing a whole lot of</span></div></li> -<li><div class="src-line"><a name="a1988"></a></span><span class="src-str"> * str_replaces to replace the &lt;span&gt;s</span></div></li> -<li><div class="src-line"><a name="a1989"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a1990"></a></span><span class="src-str"> * @since 1.0.0</span></div></li> -<li><div class="src-line"><a name="a1991"></a></span><span class="src-str"> */</span></div></li> -<li><div class="src-line"><a name="a1992"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">parse_code</span> <span class="src-sym">(</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1993"></a></span><span class="src-str"> <span class="src-comm">// Start the timer</span></span></div></li> -<li><div class="src-line"><a name="a1994"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$start_time</span> = <span class="src-id">microtime</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a1995"></a> </div></li> -<li><div class="src-line"><a name="a1996"></a></span><span class="src-str"> <span class="src-comm">// Firstly, if there is an error, we won't highlight</span></span></div></li> -<li><div class="src-line"><a name="a1997"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">error</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a1998"></a></span><span class="src-str"> <span class="src-comm">//Escape the source for output</span></span></div></li> -<li><div class="src-line"><a name="a1999"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$result</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">source</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2000"></a> </div></li> -<li><div class="src-line"><a name="a2001"></a></span><span class="src-str"> <span class="src-comm">//This fix is related to SF#1923020, but has to be applied regardless of</span></span></div></li> -<li><div class="src-line"><a name="a2002"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//actually highlighting symbols.</span></span></div></li> -<li><div class="src-line"><a name="a2003"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$result</span> = <span class="src-id">str_replace</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'<SEMI>'</span><span class="src-sym">,</span> <span class="src-str">'<PIPE>'</span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">';'</span><span class="src-sym">,</span> <span class="src-str">'|'</span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-var">$result</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2004"></a> </div></li> -<li><div class="src-line"><a name="a2005"></a></span><span class="src-str"> <span class="src-comm">// Timing is irrelevant</span></span></div></li> -<li><div class="src-line"><a name="a2006"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">set_time</span><span class="src-sym">(</span><span class="src-var">$start_time</span><span class="src-sym">,</span> <span class="src-var">$start_time</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2007"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">finalise</span><span class="src-sym">(</span><span class="src-var">$result</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2008"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$result</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2009"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2010"></a> </div></li> -<li><div class="src-line"><a name="a2011"></a></span><span class="src-str"> <span class="src-comm">// make sure the parse cache is up2date</span></span></div></li> -<li><div class="src-line"><a name="a2012"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">parse_cache_built</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2013"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">build_parse_cache</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2014"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2015"></a> </div></li> -<li><div class="src-line"><a name="a2016"></a></span><span class="src-str"> <span class="src-comm">// Replace all newlines to a common form.</span></span></div></li> -<li><div class="src-line"><a name="a2017"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$code</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">"\r\n"</span><span class="src-sym">,</span> <span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">source</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2018"></a></span><span class="src-str"> <span class="src-var">$code</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">"\r"</span><span class="src-sym">,</span> <span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-var">$code</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2019"></a> </div></li> -<li><div class="src-line"><a name="a2020"></a></span><span class="src-str"> <span class="src-comm">// Add spaces for regular expression matching and line numbers</span></span></div></li> -<li><div class="src-line"><a name="a2021"></a></span><span class="src-str"><span class="src-comm">// $code = "\n" . $code . "\n";</span></span></div></li> -<li><div class="src-line"><a name="a2022"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a2023"></a></span><span class="src-str"> <span class="src-comm">// Initialise various stuff</span></span></div></li> -<li><div class="src-line"><a name="a2024"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$length</span> = <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2025"></a></span><span class="src-str"> <span class="src-var">$COMMENT_MATCHED</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2026"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2027"></a></span><span class="src-str"> <span class="src-var">$endresult</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2028"></a> </div></li> -<li><div class="src-line"><a name="a2029"></a></span><span class="src-str"> <span class="src-comm">// "Important" selections are handled like multiline comments</span></span></div></li> -<li><div class="src-line"><a name="a2030"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// @todo GET RID OF THIS SHIZ</span></span></div></li> -<li><div class="src-line"><a name="a2031"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodenable_important_blocks">enable_important_blocks</a><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2032"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'COMMENT_MULTI'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_START_IMPORTANT">GESHI_START_IMPORTANT</a></span><span class="src-sym">]</span> = <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_END_IMPORTANT">GESHI_END_IMPORTANT</a></span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2033"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2034"></a> </div></li> -<li><div class="src-line"><a name="a2035"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">strict_mode</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2036"></a></span><span class="src-str"> <span class="src-comm">// Break the source into bits. Each bit will be a portion of the code</span></span></div></li> -<li><div class="src-line"><a name="a2037"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// within script delimiters - for example, HTML between < and ></span></span></div></li> -<li><div class="src-line"><a name="a2038"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$k</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2039"></a></span><span class="src-str"> <span class="src-var">$parts</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2040"></a></span><span class="src-str"> <span class="src-var">$matches</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2041"></a></span><span class="src-str"> <span class="src-var">$next_match_pointer</span> = <span class="src-id">null</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2042"></a></span><span class="src-str"> <span class="src-comm">// we use a copy to unset delimiters on demand (when they are not found)</span></span></div></li> -<li><div class="src-line"><a name="a2043"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$delim_copy</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'SCRIPT_DELIMITERS'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2044"></a></span><span class="src-str"> <span class="src-var">$i</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2045"></a></span><span class="src-str"> <span class="src-key">while</span> <span class="src-sym">(</span><span class="src-var">$i</span> < <span class="src-var">$length</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2046"></a></span><span class="src-str"> <span class="src-var">$next_match_pos</span> = <span class="src-var">$length</span> + <span class="src-num">1</span><span class="src-sym">;</span> <span class="src-comm">// never true</span></span></div></li> -<li><div class="src-line"><a name="a2047"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$delim_copy</span> <span class="src-key">as</span> <span class="src-var">$dk</span> => <span class="src-var">$delimiters</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2048"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$delimiters</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2049"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$delimiters</span> <span class="src-key">as</span> <span class="src-var">$open</span> => <span class="src-var">$close</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2050"></a></span><span class="src-str"> <span class="src-comm">// make sure the cache is setup properly</span></span></div></li> -<li><div class="src-line"><a name="a2051"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2052"></a></span><span class="src-str"> <span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span> = <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2053"></a></span><span class="src-str"> <span class="src-str">'next_match'</span> => -<span class="src-num">1</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2054"></a></span><span class="src-str"> <span class="src-str">'dk'</span> => <span class="src-var">$dk</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2055"></a> </div></li> -<li><div class="src-line"><a name="a2056"></a></span><span class="src-str"> <span class="src-str">'open'</span> => <span class="src-var">$open</span><span class="src-sym">,</span> <span class="src-comm">// needed for grouping of adjacent code blocks (see below)</span></span></div></li> -<li><div class="src-line"><a name="a2057"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-str">'open_strlen'</span> => <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$open</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2058"></a> </div></li> -<li><div class="src-line"><a name="a2059"></a></span><span class="src-str"> <span class="src-str">'close'</span> => <span class="src-var">$close</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2060"></a></span><span class="src-str"> <span class="src-str">'close_strlen'</span> => <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$close</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2061"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2062"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2063"></a></span><span class="src-str"> <span class="src-comm">// Get the next little bit for this opening string</span></span></div></li> -<li><div class="src-line"><a name="a2064"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'next_match'</span><span class="src-sym">]</span> < <span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2065"></a></span><span class="src-str"> <span class="src-comm">// only find the next pos if it was not already cached</span></span></div></li> -<li><div class="src-line"><a name="a2066"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$open_pos</span> = <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">,</span> <span class="src-var">$open</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2067"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$open_pos</span> === <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2068"></a></span><span class="src-str"> <span class="src-comm">// no match for this delimiter ever</span></span></div></li> -<li><div class="src-line"><a name="a2069"></a></span><span class="src-str"><span class="src-comm"></span> unset<span class="src-sym">(</span><span class="src-var">$delim_copy</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2070"></a></span><span class="src-str"> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2071"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2072"></a></span><span class="src-str"> <span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'next_match'</span><span class="src-sym">]</span> = <span class="src-var">$open_pos</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2073"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2074"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'next_match'</span><span class="src-sym">]</span> < <span class="src-var">$next_match_pos</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2075"></a></span><span class="src-str"> <span class="src-comm">//So we got a new match, update the close_pos</span></span></div></li> -<li><div class="src-line"><a name="a2076"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'close_pos'</span><span class="src-sym">]</span> =</span></div></li> -<li><div class="src-line"><a name="a2077"></a></span><span class="src-str"> <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">,</span> <span class="src-var">$close</span><span class="src-sym">,</span> <span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'next_match'</span><span class="src-sym">]</span>+<span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2078"></a> </div></li> -<li><div class="src-line"><a name="a2079"></a></span><span class="src-str"> <span class="src-var">$next_match_pointer</span> =<span class="src-sym">&</span> <span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2080"></a></span><span class="src-str"> <span class="src-var">$next_match_pos</span> = <span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'next_match'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2081"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2082"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2083"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2084"></a></span><span class="src-str"> <span class="src-comm">//So we should match an RegExp as Strict Block ...</span></span></div></li> -<li><div class="src-line"><a name="a2085"></a><span class="src-doc">/**</span><span class="src-str"><span class="src-comm"></span> </span></span></div></li> -<li><div class="src-line"><a name="a2086"></a><span class="src-doc"> * The value in $delimiters is expected to be an RegExp</span></div></li> -<li><div class="src-line"><a name="a2087"></a><span class="src-doc"> * containing exactly 2 matching groups:</span></div></li> -<li><div class="src-line"><a name="a2088"></a><span class="src-doc"> * - Group 1 is the opener</span></div></li> -<li><div class="src-line"><a name="a2089"></a><span class="src-doc"> * - Group 2 is the closer</span></div></li> -<li><div class="src-line"><a name="a2090"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a2091"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-id">GESHI_PHP_PRE_433</span> && <span class="src-comm">//Needs proper rewrite to work with PHP >=4.3.0; 4.3.3 is guaranteed to work.</span></span></div></li> -<li><div class="src-line"><a name="a2092"></a></span><span class="src-str"><span class="src-comm"></span> <a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-var">$delimiters</span><span class="src-sym">,</span> <span class="src-var">$code</span><span class="src-sym">,</span> <span class="src-var">$matches_rx</span><span class="src-sym">,</span> <span class="src-id">PREG_OFFSET_CAPTURE</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2093"></a></span><span class="src-str"> <span class="src-comm">//We got a match ...</span></span></div></li> -<li><div class="src-line"><a name="a2094"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span> = <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2095"></a></span><span class="src-str"> <span class="src-str">'next_match'</span> => <span class="src-var">$matches_rx</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2096"></a></span><span class="src-str"> <span class="src-str">'dk'</span> => <span class="src-var">$dk</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2097"></a> </div></li> -<li><div class="src-line"><a name="a2098"></a></span><span class="src-str"> <span class="src-str">'close_strlen'</span> => <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$matches_rx</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2099"></a></span><span class="src-str"> <span class="src-str">'close_pos'</span> => <span class="src-var">$matches_rx</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2100"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2101"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2102"></a></span><span class="src-str"> <span class="src-comm">// no match for this delimiter ever</span></span></div></li> -<li><div class="src-line"><a name="a2103"></a></span><span class="src-str"><span class="src-comm"></span> unset<span class="src-sym">(</span><span class="src-var">$delim_copy</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2104"></a></span><span class="src-str"> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2105"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2106"></a> </div></li> -<li><div class="src-line"><a name="a2107"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'next_match'</span><span class="src-sym">]</span> <= <span class="src-var">$next_match_pos</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2108"></a></span><span class="src-str"> <span class="src-var">$next_match_pointer</span> =<span class="src-sym">&</span> <span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2109"></a></span><span class="src-str"> <span class="src-var">$next_match_pos</span> = <span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-var">$dk</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'next_match'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2110"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2111"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2112"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2113"></a></span><span class="src-str"> <span class="src-comm">// non-highlightable text</span></span></div></li> -<li><div class="src-line"><a name="a2114"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span> = <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2115"></a></span><span class="src-str"> <span class="src-num">1</span> => <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">,</span> <span class="src-var">$next_match_pos</span> - <span class="src-var">$i</span><span class="src-sym">)</span></span></div></li> -<li><div class="src-line"><a name="a2116"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2117"></a></span><span class="src-str"> ++<span class="src-var">$k</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2118"></a> </div></li> -<li><div class="src-line"><a name="a2119"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$next_match_pos</span> > <span class="src-var">$length</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2120"></a></span><span class="src-str"> <span class="src-comm">// out of bounds means no next match was found</span></span></div></li> -<li><div class="src-line"><a name="a2121"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2122"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2123"></a> </div></li> -<li><div class="src-line"><a name="a2124"></a></span><span class="src-str"> <span class="src-comm">// highlightable code</span></span></div></li> -<li><div class="src-line"><a name="a2125"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> = <span class="src-var">$next_match_pointer</span><span class="src-sym">[</span><span class="src-str">'dk'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2126"></a> </div></li> -<li><div class="src-line"><a name="a2127"></a></span><span class="src-str"> <span class="src-comm">//Only combine for non-rx script blocks</span></span></div></li> -<li><div class="src-line"><a name="a2128"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$delim_copy</span><span class="src-sym">[</span><span class="src-var">$next_match_pointer</span><span class="src-sym">[</span><span class="src-str">'dk'</span><span class="src-sym">]]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2129"></a></span><span class="src-str"> <span class="src-comm">// group adjacent script blocks, e.g. <foobar><asdf> should be one block, not three!</span></span></div></li> -<li><div class="src-line"><a name="a2130"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$i</span> = <span class="src-var">$next_match_pos</span> + <span class="src-var">$next_match_pointer</span><span class="src-sym">[</span><span class="src-str">'open_strlen'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2131"></a></span><span class="src-str"> <span class="src-key">while</span> <span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2132"></a></span><span class="src-str"> <span class="src-var">$close_pos</span> = <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">,</span> <span class="src-var">$next_match_pointer</span><span class="src-sym">[</span><span class="src-str">'close'</span><span class="src-sym">]</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2133"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$close_pos</span> == <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2134"></a></span><span class="src-str"> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2135"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2136"></a></span><span class="src-str"> <span class="src-var">$i</span> = <span class="src-var">$close_pos</span> + <span class="src-var">$next_match_pointer</span><span class="src-sym">[</span><span class="src-str">'close_strlen'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2137"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$i</span> == <span class="src-var">$length</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2138"></a></span><span class="src-str"> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2139"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2140"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span> == <span class="src-var">$next_match_pointer</span><span class="src-sym">[</span><span class="src-str">'open'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> && <span class="src-sym">(</span><span class="src-var">$next_match_pointer</span><span class="src-sym">[</span><span class="src-str">'open_strlen'</span><span class="src-sym">]</span> == <span class="src-num">1</span> ||</span></div></li> -<li><div class="src-line"><a name="a2141"></a></span><span class="src-str"> <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">,</span> <span class="src-var">$next_match_pointer</span><span class="src-sym">[</span><span class="src-str">'open_strlen'</span><span class="src-sym">]</span><span class="src-sym">)</span> == <span class="src-var">$next_match_pointer</span><span class="src-sym">[</span><span class="src-str">'open'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2142"></a></span><span class="src-str"> <span class="src-comm">// merge adjacent but make sure we don't merge things like <tag><!-- comment --></span></span></div></li> -<li><div class="src-line"><a name="a2143"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$matches</span> <span class="src-key">as</span> <span class="src-var">$submatches</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2144"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$submatches</span> <span class="src-key">as</span> <span class="src-var">$match</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2145"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$match</span><span class="src-sym">[</span><span class="src-str">'next_match'</span><span class="src-sym">]</span> == <span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2146"></a></span><span class="src-str"> <span class="src-comm">// a different block already matches here!</span></span></div></li> -<li><div class="src-line"><a name="a2147"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">break</span> <span class="src-num">3</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2148"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2149"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2150"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2151"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2152"></a></span><span class="src-str"> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2153"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2154"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2155"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2156"></a></span><span class="src-str"> <span class="src-var">$close_pos</span> = <span class="src-var">$next_match_pointer</span><span class="src-sym">[</span><span class="src-str">'close_pos'</span><span class="src-sym">]</span> + <span class="src-var">$next_match_pointer</span><span class="src-sym">[</span><span class="src-str">'close_strlen'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2157"></a></span><span class="src-str"> <span class="src-var">$i</span> = <span class="src-var">$close_pos</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2158"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2159"></a> </div></li> -<li><div class="src-line"><a name="a2160"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$close_pos</span> === <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2161"></a></span><span class="src-str"> <span class="src-comm">// no closing delimiter found!</span></span></div></li> -<li><div class="src-line"><a name="a2162"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span> = <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">,</span> <span class="src-var">$next_match_pos</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2163"></a></span><span class="src-str"> ++<span class="src-var">$k</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2164"></a></span><span class="src-str"> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2165"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2166"></a></span><span class="src-str"> <span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span> = <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">,</span> <span class="src-var">$next_match_pos</span><span class="src-sym">,</span> <span class="src-var">$i</span> - <span class="src-var">$next_match_pos</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2167"></a></span><span class="src-str"> ++<span class="src-var">$k</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2168"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2169"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2170"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$delim_copy</span><span class="src-sym">,</span> <span class="src-var">$next_match_pointer</span><span class="src-sym">,</span> <span class="src-var">$next_match_pos</span><span class="src-sym">,</span> <span class="src-var">$matches</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2171"></a></span><span class="src-str"> <span class="src-var">$num_parts</span> = <span class="src-var">$k</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2172"></a> </div></li> -<li><div class="src-line"><a name="a2173"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$num_parts</span> == <span class="src-num">1</span> && <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">strict_mode</span> == <span class="src-id">GESHI_MAYBE</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2174"></a></span><span class="src-str"> <span class="src-comm">// when we have only one part, we don't have anything to highlight at all.</span></span></div></li> -<li><div class="src-line"><a name="a2175"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// if we have a "maybe" strict language, this should be handled as highlightable code</span></span></div></li> -<li><div class="src-line"><a name="a2176"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$parts</span> = <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2177"></a></span><span class="src-str"> <span class="src-num">0</span> => <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2178"></a></span><span class="src-str"> <span class="src-num">0</span> => <span class="src-str">''</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2179"></a></span><span class="src-str"> <span class="src-num">1</span> => <span class="src-str">''</span></span></div></li> -<li><div class="src-line"><a name="a2180"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2181"></a></span><span class="src-str"> <span class="src-num">1</span> => <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2182"></a></span><span class="src-str"> <span class="src-num">0</span> => <span class="src-id">null</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2183"></a></span><span class="src-str"> <span class="src-num">1</span> => <span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span></span></div></li> -<li><div class="src-line"><a name="a2184"></a></span><span class="src-str"> <span class="src-sym">)</span></span></div></li> -<li><div class="src-line"><a name="a2185"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2186"></a></span><span class="src-str"> <span class="src-var">$num_parts</span> = <span class="src-num">2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2187"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2188"></a> </div></li> -<li><div class="src-line"><a name="a2189"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2190"></a></span><span class="src-str"> <span class="src-comm">// Not strict mode - simply dump the source into</span></span></div></li> -<li><div class="src-line"><a name="a2191"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// the array at index 1 (the first highlightable block)</span></span></div></li> -<li><div class="src-line"><a name="a2192"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$parts</span> = <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2193"></a></span><span class="src-str"> <span class="src-num">0</span> => <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2194"></a></span><span class="src-str"> <span class="src-num">0</span> => <span class="src-str">''</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2195"></a></span><span class="src-str"> <span class="src-num">1</span> => <span class="src-str">''</span></span></div></li> -<li><div class="src-line"><a name="a2196"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2197"></a></span><span class="src-str"> <span class="src-num">1</span> => <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2198"></a></span><span class="src-str"> <span class="src-num">0</span> => <span class="src-id">null</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2199"></a></span><span class="src-str"> <span class="src-num">1</span> => <span class="src-var">$code</span></span></div></li> -<li><div class="src-line"><a name="a2200"></a></span><span class="src-str"> <span class="src-sym">)</span></span></div></li> -<li><div class="src-line"><a name="a2201"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2202"></a></span><span class="src-str"> <span class="src-var">$num_parts</span> = <span class="src-num">2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2203"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2204"></a> </div></li> -<li><div class="src-line"><a name="a2205"></a></span><span class="src-str"> <span class="src-comm">//Unset variables we won't need any longer</span></span></div></li> -<li><div class="src-line"><a name="a2206"></a></span><span class="src-str"><span class="src-comm"></span> unset<span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2207"></a> </div></li> -<li><div class="src-line"><a name="a2208"></a></span><span class="src-str"> <span class="src-comm">//Preload some repeatedly used values regarding hardquotes ...</span></span></div></li> -<li><div class="src-line"><a name="a2209"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$hq</span> = isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'HARDQUOTE'</span><span class="src-sym">]</span><span class="src-sym">)</span> ? <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'HARDQUOTE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> : <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2210"></a></span><span class="src-str"> <span class="src-var">$hq_strlen</span> = <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$hq</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2211"></a> </div></li> -<li><div class="src-line"><a name="a2212"></a></span><span class="src-str"> <span class="src-comm">//Preload if line numbers are to be generated afterwards</span></span></div></li> -<li><div class="src-line"><a name="a2213"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//Added a check if line breaks should be forced even without line numbers, fixes SF#1727398</span></span></div></li> -<li><div class="src-line"><a name="a2214"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$check_linenumbers</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a></span> ||</span></div></li> -<li><div class="src-line"><a name="a2215"></a></span><span class="src-str"> <span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines</span><span class="src-sym">)</span> || <span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">allow_multiline_span</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2216"></a> </div></li> -<li><div class="src-line"><a name="a2217"></a></span><span class="src-str"> <span class="src-comm">//preload the escape char for faster checking ...</span></span></div></li> -<li><div class="src-line"><a name="a2218"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$escaped_escape_char</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2219"></a> </div></li> -<li><div class="src-line"><a name="a2220"></a></span><span class="src-str"> <span class="src-comm">// this is used for single-line comments</span></span></div></li> -<li><div class="src-line"><a name="a2221"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$sc_disallowed_before</span> = <span class="src-str">""</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2222"></a></span><span class="src-str"> <span class="src-var">$sc_disallowed_after</span> = <span class="src-str">""</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2223"></a> </div></li> -<li><div class="src-line"><a name="a2224"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2225"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2226"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'DISALLOWED_BEFORE'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2227"></a></span><span class="src-str"> <span class="src-var">$sc_disallowed_before</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'DISALLOWED_BEFORE'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2228"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2229"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'DISALLOWED_AFTER'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2230"></a></span><span class="src-str"> <span class="src-var">$sc_disallowed_after</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'DISALLOWED_AFTER'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2231"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2232"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2233"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2234"></a> </div></li> -<li><div class="src-line"><a name="a2235"></a></span><span class="src-str"> <span class="src-comm">//Fix for SF#1932083: Multichar Quotemarks unsupported</span></span></div></li> -<li><div class="src-line"><a name="a2236"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$is_string_starter</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2237"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'STRINGS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2238"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'QUOTEMARKS'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$quotemark</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2239"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$is_string_starter</span><span class="src-sym">[</span><span class="src-var">$quotemark</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2240"></a></span><span class="src-str"> <span class="src-var">$is_string_starter</span><span class="src-sym">[</span><span class="src-var">$quotemark</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]]</span> = (string)<span class="src-var">$quotemark</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2241"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/is_string">is_string</a><span class="src-sym">(</span><span class="src-var">$is_string_starter</span><span class="src-sym">[</span><span class="src-var">$quotemark</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2242"></a></span><span class="src-str"> <span class="src-var">$is_string_starter</span><span class="src-sym">[</span><span class="src-var">$quotemark</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]]</span> = <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2243"></a></span><span class="src-str"> <span class="src-var">$is_string_starter</span><span class="src-sym">[</span><span class="src-var">$quotemark</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]]</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2244"></a></span><span class="src-str"> <span class="src-var">$quotemark</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2245"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2246"></a></span><span class="src-str"> <span class="src-var">$is_string_starter</span><span class="src-sym">[</span><span class="src-var">$quotemark</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]]</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-var">$quotemark</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2247"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2248"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2249"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2250"></a> </div></li> -<li><div class="src-line"><a name="a2251"></a></span><span class="src-str"> <span class="src-comm">// Now we go through each part. We know that even-indexed parts are</span></span></div></li> -<li><div class="src-line"><a name="a2252"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// code that shouldn't be highlighted, and odd-indexed parts should</span></span></div></li> -<li><div class="src-line"><a name="a2253"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// be highlighted</span></span></div></li> -<li><div class="src-line"><a name="a2254"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">for</span> <span class="src-sym">(</span><span class="src-var">$key</span> = <span class="src-num">0</span><span class="src-sym">;</span> <span class="src-var">$key</span> < <span class="src-var">$num_parts</span><span class="src-sym">;</span> ++<span class="src-var">$key</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2255"></a></span><span class="src-str"> <span class="src-var">$STRICTATTRS</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2256"></a> </div></li> -<li><div class="src-line"><a name="a2257"></a></span><span class="src-str"> <span class="src-comm">// If this block should be highlighted...</span></span></div></li> -<li><div class="src-line"><a name="a2258"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-sym">(</span><span class="src-var">$key</span> <span class="src-sym">&</span> <span class="src-num">1</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2259"></a></span><span class="src-str"> <span class="src-comm">// Else not a block to highlight</span></span></div></li> -<li><div class="src-line"><a name="a2260"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$endresult</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2261"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2262"></a></span><span class="src-str"> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2263"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2264"></a> </div></li> -<li><div class="src-line"><a name="a2265"></a></span><span class="src-str"> <span class="src-var">$result</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2266"></a></span><span class="src-str"> <span class="src-var">$part</span> = <span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2267"></a> </div></li> -<li><div class="src-line"><a name="a2268"></a></span><span class="src-str"> <span class="src-var">$highlight_part</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2269"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">strict_mode</span> && <span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2270"></a></span><span class="src-str"> <span class="src-comm">// get the class key for this block of code</span></span></div></li> -<li><div class="src-line"><a name="a2271"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$script_key</span> = <span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2272"></a></span><span class="src-str"> <span class="src-var">$highlight_part</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'HIGHLIGHT_STRICT_BLOCK'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$script_key</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2273"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'SCRIPT'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$script_key</span><span class="src-sym">]</span> != <span class="src-str">''</span> &&</span></div></li> -<li><div class="src-line"><a name="a2274"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'SCRIPT'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2275"></a></span><span class="src-str"> <span class="src-comm">// Add a span element around the source to</span></span></div></li> -<li><div class="src-line"><a name="a2276"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// highlight the overall source block</span></span></div></li> -<li><div class="src-line"><a name="a2277"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span> &&</span></div></li> -<li><div class="src-line"><a name="a2278"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'SCRIPT'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$script_key</span><span class="src-sym">]</span> != <span class="src-str">''</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2279"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'SCRIPT'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$script_key</span><span class="src-sym">]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2280"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2281"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' class="sc'</span> . <span class="src-var">$script_key</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2282"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2283"></a></span><span class="src-str"> <span class="src-var">$result</span> .= <span class="src-str">"</span></span><span<span class="src-var">$attributes</span>><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2284"></a></span><span class="src-str"> <span class="src-var">$STRICTATTRS</span> = <span class="src-var">$attributes</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2285"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2286"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2287"></a> </div></li> -<li><div class="src-line"><a name="a2288"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$highlight_part</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2289"></a></span><span class="src-str"> <span class="src-comm">// Now, highlight the code in this block. This code</span></span></div></li> -<li><div class="src-line"><a name="a2290"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// is really the engine of GeSHi (along with the method</span></span></div></li> -<li><div class="src-line"><a name="a2291"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// parse_non_string_part).</span></span></div></li> -<li><div class="src-line"><a name="a2292"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a2293"></a></span><span class="src-str"> <span class="src-comm">// cache comment regexps incrementally</span></span></div></li> -<li><div class="src-line"><a name="a2294"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$next_comment_regexp_key</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2295"></a></span><span class="src-str"> <span class="src-var">$next_comment_regexp_pos</span> = -<span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2296"></a></span><span class="src-str"> <span class="src-var">$next_comment_multi_pos</span> = -<span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2297"></a></span><span class="src-str"> <span class="src-var">$next_comment_single_pos</span> = -<span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2298"></a></span><span class="src-str"> <span class="src-var">$comment_regexp_cache_per_key</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2299"></a></span><span class="src-str"> <span class="src-var">$comment_multi_cache_per_key</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2300"></a></span><span class="src-str"> <span class="src-var">$comment_single_cache_per_key</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2301"></a></span><span class="src-str"> <span class="src-var">$next_open_comment_multi</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2302"></a></span><span class="src-str"> <span class="src-var">$next_comment_single_key</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2303"></a></span><span class="src-str"> <span class="src-var">$escape_regexp_cache_per_key</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2304"></a></span><span class="src-str"> <span class="src-var">$next_escape_regexp_key</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2305"></a></span><span class="src-str"> <span class="src-var">$next_escape_regexp_pos</span> = -<span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2306"></a> </div></li> -<li><div class="src-line"><a name="a2307"></a></span><span class="src-str"> <span class="src-var">$length</span> = <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2308"></a></span><span class="src-str"> <span class="src-key">for</span> <span class="src-sym">(</span><span class="src-var">$i</span> = <span class="src-num">0</span><span class="src-sym">;</span> <span class="src-var">$i</span> < <span class="src-var">$length</span><span class="src-sym">;</span> ++<span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2309"></a></span><span class="src-str"> <span class="src-comm">// Get the next char</span></span></div></li> -<li><div class="src-line"><a name="a2310"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$char</span> = <span class="src-var">$part</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2311"></a></span><span class="src-str"> <span class="src-var">$char_len</span> = <span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2312"></a> </div></li> -<li><div class="src-line"><a name="a2313"></a></span><span class="src-str"> <span class="src-comm">// update regexp comment cache if needed</span></span></div></li> -<li><div class="src-line"><a name="a2314"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'COMMENT_REGEXP'</span><span class="src-sym">]</span><span class="src-sym">)</span> && <span class="src-var">$next_comment_regexp_pos</span> < <span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2315"></a></span><span class="src-str"> <span class="src-var">$next_comment_regexp_pos</span> = <span class="src-var">$length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2316"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'COMMENT_REGEXP'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$comment_key</span> => <span class="src-var">$regexp</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2317"></a></span><span class="src-str"> <span class="src-var">$match_i</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2318"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$comment_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span><span class="src-sym">)</span> &&</span></div></li> -<li><div class="src-line"><a name="a2319"></a></span><span class="src-str"> <span class="src-sym">(</span><span class="src-var">$comment_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'pos'</span><span class="src-sym">]</span> >= <span class="src-var">$i</span> ||</span></div></li> -<li><div class="src-line"><a name="a2320"></a></span><span class="src-str"> <span class="src-var">$comment_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'pos'</span><span class="src-sym">]</span> === <span class="src-id">false</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2321"></a></span><span class="src-str"> <span class="src-comm">// we have already matched something</span></span></div></li> -<li><div class="src-line"><a name="a2322"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$comment_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'pos'</span><span class="src-sym">]</span> === <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2323"></a></span><span class="src-str"> <span class="src-comm">// this comment is never matched</span></span></div></li> -<li><div class="src-line"><a name="a2324"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2325"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2326"></a></span><span class="src-str"> <span class="src-var">$match_i</span> = <span class="src-var">$comment_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'pos'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2327"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2328"></a></span><span class="src-str"> <span class="src-comm">//This is to allow use of the offset parameter in preg_match and stay as compatible with older PHP versions as possible</span></span></div></li> -<li><div class="src-line"><a name="a2329"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-sym">(</span><span class="src-id">GESHI_PHP_PRE_433</span> && <a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-var">$regexp</span><span class="src-sym">,</span> <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-var">$match</span><span class="src-sym">,</span> <span class="src-id">PREG_OFFSET_CAPTURE</span><span class="src-sym">))</span> ||</span></div></li> -<li><div class="src-line"><a name="a2330"></a></span><span class="src-str"> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-id">GESHI_PHP_PRE_433</span> && <a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-var">$regexp</span><span class="src-sym">,</span> <span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$match</span><span class="src-sym">,</span> <span class="src-id">PREG_OFFSET_CAPTURE</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">))</span></span></div></li> -<li><div class="src-line"><a name="a2331"></a></span><span class="src-str"> <span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2332"></a></span><span class="src-str"> <span class="src-var">$match_i</span> = <span class="src-var">$match</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2333"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-id">GESHI_PHP_PRE_433</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2334"></a></span><span class="src-str"> <span class="src-var">$match_i</span> += <span class="src-var">$i</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2335"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2336"></a> </div></li> -<li><div class="src-line"><a name="a2337"></a></span><span class="src-str"> <span class="src-var">$comment_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span> = <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2338"></a></span><span class="src-str"> <span class="src-str">'key'</span> => <span class="src-var">$comment_key</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2339"></a></span><span class="src-str"> <span class="src-str">'length'</span> => <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$match</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2340"></a></span><span class="src-str"> <span class="src-str">'pos'</span> => <span class="src-var">$match_i</span></span></div></li> -<li><div class="src-line"><a name="a2341"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2342"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2343"></a></span><span class="src-str"> <span class="src-var">$comment_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'pos'</span><span class="src-sym">]</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2344"></a></span><span class="src-str"> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2345"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2346"></a> </div></li> -<li><div class="src-line"><a name="a2347"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$match_i</span> !== <span class="src-id">false</span> && <span class="src-var">$match_i</span> < <span class="src-var">$next_comment_regexp_pos</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2348"></a></span><span class="src-str"> <span class="src-var">$next_comment_regexp_pos</span> = <span class="src-var">$match_i</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2349"></a></span><span class="src-str"> <span class="src-var">$next_comment_regexp_key</span> = <span class="src-var">$comment_key</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2350"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$match_i</span> === <span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2351"></a></span><span class="src-str"> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2352"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2353"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2354"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2355"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2356"></a> </div></li> -<li><div class="src-line"><a name="a2357"></a></span><span class="src-str"> <span class="src-var">$string_started</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2358"></a> </div></li> -<li><div class="src-line"><a name="a2359"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$is_string_starter</span><span class="src-sym">[</span><span class="src-var">$char</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2360"></a></span><span class="src-str"> <span class="src-comm">// Possibly the start of a new string ...</span></span></div></li> -<li><div class="src-line"><a name="a2361"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a2362"></a></span><span class="src-str"> <span class="src-comm">//Check which starter it was ...</span></span></div></li> -<li><div class="src-line"><a name="a2363"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//Fix for SF#1932083: Multichar Quotemarks unsupported</span></span></div></li> -<li><div class="src-line"><a name="a2364"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$is_string_starter</span><span class="src-sym">[</span><span class="src-var">$char</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2365"></a></span><span class="src-str"> <span class="src-var">$char_new</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2366"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$is_string_starter</span><span class="src-sym">[</span><span class="src-var">$char</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$testchar</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2367"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$testchar</span> === <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">,</span> <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$testchar</span><span class="src-sym">))</span> &&</span></div></li> -<li><div class="src-line"><a name="a2368"></a></span><span class="src-str"> <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$testchar</span><span class="src-sym">)</span> > <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$char_new</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2369"></a></span><span class="src-str"> <span class="src-var">$char_new</span> = <span class="src-var">$testchar</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2370"></a></span><span class="src-str"> <span class="src-var">$string_started</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2371"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2372"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2373"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$string_started</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2374"></a></span><span class="src-str"> <span class="src-var">$char</span> = <span class="src-var">$char_new</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2375"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2376"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2377"></a></span><span class="src-str"> <span class="src-var">$testchar</span> = <span class="src-var">$is_string_starter</span><span class="src-sym">[</span><span class="src-var">$char</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2378"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$testchar</span> === <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">,</span> <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$testchar</span><span class="src-sym">)))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2379"></a></span><span class="src-str"> <span class="src-var">$char</span> = <span class="src-var">$testchar</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2380"></a></span><span class="src-str"> <span class="src-var">$string_started</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2381"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2382"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2383"></a></span><span class="src-str"> <span class="src-var">$char_len</span> = <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$char</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2384"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2385"></a> </div></li> -<li><div class="src-line"><a name="a2386"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$string_started</span> && <span class="src-var">$i</span> != <span class="src-var">$next_comment_regexp_pos</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2387"></a></span><span class="src-str"> <span class="src-comm">// Hand out the correct style information for this string</span></span></div></li> -<li><div class="src-line"><a name="a2388"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$string_key</span> = <a href="http://www.php.net/array_search">array_search</a><span class="src-sym">(</span><span class="src-var">$char</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'QUOTEMARKS'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2389"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'STRINGS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$string_key</span><span class="src-sym">]</span><span class="src-sym">)</span> ||</span></div></li> -<li><div class="src-line"><a name="a2390"></a></span><span class="src-str"> <span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$string_key</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2391"></a></span><span class="src-str"> <span class="src-var">$string_key</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2392"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2393"></a> </div></li> -<li><div class="src-line"><a name="a2394"></a></span><span class="src-str"> <span class="src-comm">// parse the stuff before this</span></span></div></li> -<li><div class="src-line"><a name="a2395"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$result</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">parse_non_string_part</span><span class="src-sym">(</span><span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2396"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2397"></a> </div></li> -<li><div class="src-line"><a name="a2398"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2399"></a></span><span class="src-str"> <span class="src-var">$string_attributes</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'STRINGS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$string_key</span><span class="src-sym">]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2400"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2401"></a></span><span class="src-str"> <span class="src-var">$string_attributes</span> = <span class="src-str">' class="st'</span>.<span class="src-var">$string_key</span>.<span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2402"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2403"></a> </div></li> -<li><div class="src-line"><a name="a2404"></a></span><span class="src-str"> <span class="src-comm">// now handle the string</span></span></div></li> -<li><div class="src-line"><a name="a2405"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$string</span> = <span class="src-str">"</span></span><span<span class="src-var">$string_attributes</span>><span class="src-str">" </span><span class="src-str">. <span class="src-id">GeSHi</span><span class="src-sym">::</span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$char</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2406"></a></span><span class="src-str"> <span class="src-var">$start</span> = <span class="src-var">$i</span> + <span class="src-var">$char_len</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2407"></a></span><span class="src-str"> <span class="src-var">$string_open</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2408"></a> </div></li> -<li><div class="src-line"><a name="a2409"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_REGEXP'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2410"></a></span><span class="src-str"> <span class="src-var">$next_escape_regexp_pos</span> = <span class="src-var">$length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2411"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2412"></a> </div></li> -<li><div class="src-line"><a name="a2413"></a></span><span class="src-str"> do <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2414"></a></span><span class="src-str"> <span class="src-comm">//Get the regular ending pos ...</span></span></div></li> -<li><div class="src-line"><a name="a2415"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$close_pos</span> = <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$char</span><span class="src-sym">,</span> <span class="src-var">$start</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2416"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-id">false</span> === <span class="src-var">$close_pos</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2417"></a></span><span class="src-str"> <span class="src-var">$close_pos</span> = <span class="src-var">$length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2418"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2419"></a> </div></li> -<li><div class="src-line"><a name="a2420"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2421"></a></span><span class="src-str"> <span class="src-comm">// update escape regexp cache if needed</span></span></div></li> -<li><div class="src-line"><a name="a2422"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_REGEXP'</span><span class="src-sym">]</span><span class="src-sym">)</span> && <span class="src-var">$next_escape_regexp_pos</span> < <span class="src-var">$start</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2423"></a></span><span class="src-str"> <span class="src-var">$next_escape_regexp_pos</span> = <span class="src-var">$length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2424"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_REGEXP'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$escape_key</span> => <span class="src-var">$regexp</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2425"></a></span><span class="src-str"> <span class="src-var">$match_i</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2426"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$escape_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$escape_key</span><span class="src-sym">]</span><span class="src-sym">)</span> &&</span></div></li> -<li><div class="src-line"><a name="a2427"></a></span><span class="src-str"> <span class="src-sym">(</span><span class="src-var">$escape_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$escape_key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'pos'</span><span class="src-sym">]</span> >= <span class="src-var">$start</span> ||</span></div></li> -<li><div class="src-line"><a name="a2428"></a></span><span class="src-str"> <span class="src-var">$escape_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$escape_key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'pos'</span><span class="src-sym">]</span> === <span class="src-id">false</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2429"></a></span><span class="src-str"> <span class="src-comm">// we have already matched something</span></span></div></li> -<li><div class="src-line"><a name="a2430"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$escape_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$escape_key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'pos'</span><span class="src-sym">]</span> === <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2431"></a></span><span class="src-str"> <span class="src-comm">// this comment is never matched</span></span></div></li> -<li><div class="src-line"><a name="a2432"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2433"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2434"></a></span><span class="src-str"> <span class="src-var">$match_i</span> = <span class="src-var">$escape_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$escape_key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'pos'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2435"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2436"></a></span><span class="src-str"> <span class="src-comm">//This is to allow use of the offset parameter in preg_match and stay as compatible with older PHP versions as possible</span></span></div></li> -<li><div class="src-line"><a name="a2437"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-sym">(</span><span class="src-id">GESHI_PHP_PRE_433</span> && <a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-var">$regexp</span><span class="src-sym">,</span> <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$start</span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-var">$match</span><span class="src-sym">,</span> <span class="src-id">PREG_OFFSET_CAPTURE</span><span class="src-sym">))</span> ||</span></div></li> -<li><div class="src-line"><a name="a2438"></a></span><span class="src-str"> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-id">GESHI_PHP_PRE_433</span> && <a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-var">$regexp</span><span class="src-sym">,</span> <span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$match</span><span class="src-sym">,</span> <span class="src-id">PREG_OFFSET_CAPTURE</span><span class="src-sym">,</span> <span class="src-var">$start</span><span class="src-sym">))</span></span></div></li> -<li><div class="src-line"><a name="a2439"></a></span><span class="src-str"> <span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2440"></a></span><span class="src-str"> <span class="src-var">$match_i</span> = <span class="src-var">$match</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2441"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-id">GESHI_PHP_PRE_433</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2442"></a></span><span class="src-str"> <span class="src-var">$match_i</span> += <span class="src-var">$start</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2443"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2444"></a> </div></li> -<li><div class="src-line"><a name="a2445"></a></span><span class="src-str"> <span class="src-var">$escape_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$escape_key</span><span class="src-sym">]</span> = <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2446"></a></span><span class="src-str"> <span class="src-str">'key'</span> => <span class="src-var">$escape_key</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2447"></a></span><span class="src-str"> <span class="src-str">'length'</span> => <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$match</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2448"></a></span><span class="src-str"> <span class="src-str">'pos'</span> => <span class="src-var">$match_i</span></span></div></li> -<li><div class="src-line"><a name="a2449"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2450"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2451"></a></span><span class="src-str"> <span class="src-var">$escape_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$escape_key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'pos'</span><span class="src-sym">]</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2452"></a></span><span class="src-str"> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2453"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2454"></a> </div></li> -<li><div class="src-line"><a name="a2455"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$match_i</span> !== <span class="src-id">false</span> && <span class="src-var">$match_i</span> < <span class="src-var">$next_escape_regexp_pos</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2456"></a></span><span class="src-str"> <span class="src-var">$next_escape_regexp_pos</span> = <span class="src-var">$match_i</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2457"></a></span><span class="src-str"> <span class="src-var">$next_escape_regexp_key</span> = <span class="src-var">$escape_key</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2458"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$match_i</span> === <span class="src-var">$start</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2459"></a></span><span class="src-str"> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2460"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2461"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2462"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2463"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2464"></a> </div></li> -<li><div class="src-line"><a name="a2465"></a></span><span class="src-str"> <span class="src-comm">//Find the next simple escape position</span></span></div></li> -<li><div class="src-line"><a name="a2466"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-str">''</span> != <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2467"></a></span><span class="src-str"> <span class="src-var">$simple_escape</span> = <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">,</span> <span class="src-var">$start</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2468"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-id">false</span> === <span class="src-var">$simple_escape</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2469"></a></span><span class="src-str"> <span class="src-var">$simple_escape</span> = <span class="src-var">$length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2470"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2471"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2472"></a></span><span class="src-str"> <span class="src-var">$simple_escape</span> = <span class="src-var">$length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2473"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2474"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2475"></a></span><span class="src-str"> <span class="src-var">$next_escape_regexp_pos</span> = <span class="src-var">$length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2476"></a></span><span class="src-str"> <span class="src-var">$simple_escape</span> = <span class="src-var">$length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2477"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2478"></a> </div></li> -<li><div class="src-line"><a name="a2479"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$simple_escape</span> < <span class="src-var">$next_escape_regexp_pos</span> &&</span></div></li> -<li><div class="src-line"><a name="a2480"></a></span><span class="src-str"> <span class="src-var">$simple_escape</span> < <span class="src-var">$length</span> &&</span></div></li> -<li><div class="src-line"><a name="a2481"></a></span><span class="src-str"> <span class="src-var">$simple_escape</span> < <span class="src-var">$close_pos</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2482"></a></span><span class="src-str"> <span class="src-comm">//The nexxt escape sequence is a simple one ...</span></span></div></li> -<li><div class="src-line"><a name="a2483"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$es_pos</span> = <span class="src-var">$simple_escape</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2484"></a> </div></li> -<li><div class="src-line"><a name="a2485"></a></span><span class="src-str"> <span class="src-comm">//Add the stuff not in the string yet ...</span></span></div></li> -<li><div class="src-line"><a name="a2486"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$string</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$start</span><span class="src-sym">,</span> <span class="src-var">$es_pos</span> - <span class="src-var">$start</span><span class="src-sym">))</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2487"></a> </div></li> -<li><div class="src-line"><a name="a2488"></a></span><span class="src-str"> <span class="src-comm">//Get the style for this escaped char ...</span></span></div></li> -<li><div class="src-line"><a name="a2489"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2490"></a></span><span class="src-str"> <span class="src-var">$escape_char_attributes</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2491"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2492"></a></span><span class="src-str"> <span class="src-var">$escape_char_attributes</span> = <span class="src-str">' class="es0"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2493"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2494"></a> </div></li> -<li><div class="src-line"><a name="a2495"></a></span><span class="src-str"> <span class="src-comm">//Add the style for the escape char ...</span></span></div></li> -<li><div class="src-line"><a name="a2496"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$string</span> .= <span class="src-str">"</span></span><span<span class="src-var">$escape_char_attributes</span>><span class="src-str">" </span><span class="src-str">.</span></div></li> -<li><div class="src-line"><a name="a2497"></a></span><span class="src-str"> <span class="src-id">GeSHi</span><span class="src-sym">::</span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2498"></a> </div></li> -<li><div class="src-line"><a name="a2499"></a></span><span class="src-str"> <span class="src-comm">//Get the byte AFTER the ESCAPE_CHAR we just found</span></span></div></li> -<li><div class="src-line"><a name="a2500"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$es_char</span> = <span class="src-var">$part</span><span class="src-sym">[</span><span class="src-var">$es_pos</span> + <span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2501"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$es_char</span> == <span class="src-str">"\n"</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2502"></a></span><span class="src-str"> <span class="src-comm">// don't put a newline around newlines</span></span></div></li> -<li><div class="src-line"><a name="a2503"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$string</span> .= <span class="src-str">"</span>\n"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2504"></a></span><span class="src-str"> <span class="src-var">$start</span> = <span class="src-var">$es_pos</span> + <span class="src-num">2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2505"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/ord">ord</a><span class="src-sym">(</span><span class="src-var">$es_char</span><span class="src-sym">)</span> >= <span class="src-num">128</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2506"></a></span><span class="src-str"> <span class="src-comm">//This is an non-ASCII char (UTF8 or single byte)</span></span></div></li> -<li><div class="src-line"><a name="a2507"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//This code tries to work around SF#2037598 ...</span></span></div></li> -<li><div class="src-line"><a name="a2508"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/function_exists">function_exists</a><span class="src-sym">(</span><span class="src-str">'mb_substr'</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2509"></a></span><span class="src-str"> <span class="src-var">$es_char_m</span> = <a href="http://www.php.net/mb_substr">mb_substr</a><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$es_pos</span>+<span class="src-num">1</span><span class="src-sym">,</span> <span class="src-num">16</span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-num">0</span><span class="src-sym">,</span> <span class="src-num">1</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">encoding</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2510"></a></span><span class="src-str"> <span class="src-var">$string</span> .= <span class="src-var">$es_char_m</span> . <span class="src-str">'</span>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2511"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-id">GESHI_PHP_PRE_433</span> && <span class="src-str">'utf-8'</span> == <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">encoding</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2512"></a></span><span class="src-str"> <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">"/[\xC2-\xDF][\x80-\xBF]"</span>.</span></div></li> -<li><div class="src-line"><a name="a2513"></a></span><span class="src-str"> <span class="src-str">"|\xE0[\xA0-\xBF][\x80-\xBF]"</span>.</span></div></li> -<li><div class="src-line"><a name="a2514"></a></span><span class="src-str"> <span class="src-str">"|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}"</span>.</span></div></li> -<li><div class="src-line"><a name="a2515"></a></span><span class="src-str"> <span class="src-str">"|\xED[\x80-\x9F][\x80-\xBF]"</span>.</span></div></li> -<li><div class="src-line"><a name="a2516"></a></span><span class="src-str"> <span class="src-str">"|\xF0[\x90-\xBF][\x80-\xBF]{2}"</span>.</span></div></li> -<li><div class="src-line"><a name="a2517"></a></span><span class="src-str"> <span class="src-str">"|[\xF1-\xF3][\x80-\xBF]{3}"</span>.</span></div></li> -<li><div class="src-line"><a name="a2518"></a></span><span class="src-str"> <span class="src-str">"|\xF4[\x80-\x8F][\x80-\xBF]{2}/s"</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2519"></a></span><span class="src-str"> <span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$es_char_m</span><span class="src-sym">,</span> <span class="src-id">null</span><span class="src-sym">,</span> <span class="src-var">$es_pos</span> + <span class="src-num">1</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2520"></a></span><span class="src-str"> <span class="src-var">$es_char_m</span> = <span class="src-var">$es_char_m</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2521"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2522"></a></span><span class="src-str"> <span class="src-var">$es_char_m</span> = <span class="src-var">$es_char</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2523"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2524"></a></span><span class="src-str"> <span class="src-var">$string</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$es_char_m</span><span class="src-sym">)</span> . <span class="src-str">'</span>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2525"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2526"></a></span><span class="src-str"> <span class="src-var">$es_char_m</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$es_char</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2527"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2528"></a></span><span class="src-str"> <span class="src-var">$start</span> = <span class="src-var">$es_pos</span> + <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$es_char_m</span><span class="src-sym">)</span> + <span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2529"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2530"></a></span><span class="src-str"> <span class="src-var">$string</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$es_char</span><span class="src-sym">)</span> . <span class="src-str">'</span>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2531"></a></span><span class="src-str"> <span class="src-var">$start</span> = <span class="src-var">$es_pos</span> + <span class="src-num">2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2532"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2533"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$next_escape_regexp_pos</span> < <span class="src-var">$length</span> &&</span></div></li> -<li><div class="src-line"><a name="a2534"></a></span><span class="src-str"> <span class="src-var">$next_escape_regexp_pos</span> < <span class="src-var">$close_pos</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2535"></a></span><span class="src-str"> <span class="src-var">$es_pos</span> = <span class="src-var">$next_escape_regexp_pos</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2536"></a></span><span class="src-str"> <span class="src-comm">//Add the stuff not in the string yet ...</span></span></div></li> -<li><div class="src-line"><a name="a2537"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$string</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$start</span><span class="src-sym">,</span> <span class="src-var">$es_pos</span> - <span class="src-var">$start</span><span class="src-sym">))</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2538"></a> </div></li> -<li><div class="src-line"><a name="a2539"></a></span><span class="src-str"> <span class="src-comm">//Get the key and length of this match ...</span></span></div></li> -<li><div class="src-line"><a name="a2540"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$escape</span> = <span class="src-var">$escape_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$next_escape_regexp_key</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2541"></a></span><span class="src-str"> <span class="src-var">$escape_str</span> = <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$es_pos</span><span class="src-sym">,</span> <span class="src-var">$escape</span><span class="src-sym">[</span><span class="src-str">'length'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2542"></a></span><span class="src-str"> <span class="src-var">$escape_key</span> = <span class="src-var">$escape</span><span class="src-sym">[</span><span class="src-str">'key'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2543"></a> </div></li> -<li><div class="src-line"><a name="a2544"></a></span><span class="src-str"> <span class="src-comm">//Get the style for this escaped char ...</span></span></div></li> -<li><div class="src-line"><a name="a2545"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2546"></a></span><span class="src-str"> <span class="src-var">$escape_char_attributes</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$escape_key</span><span class="src-sym">]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2547"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2548"></a></span><span class="src-str"> <span class="src-var">$escape_char_attributes</span> = <span class="src-str">' class="es'</span> . <span class="src-var">$escape_key</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2549"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2550"></a> </div></li> -<li><div class="src-line"><a name="a2551"></a></span><span class="src-str"> <span class="src-comm">//Add the style for the escape char ...</span></span></div></li> -<li><div class="src-line"><a name="a2552"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$string</span> .= <span class="src-str">"</span></span><span<span class="src-var">$escape_char_attributes</span>><span class="src-str">" </span><span class="src-str">.</span></div></li> -<li><div class="src-line"><a name="a2553"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$escape_str</span><span class="src-sym">)</span> . <span class="src-str">'</span>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2554"></a> </div></li> -<li><div class="src-line"><a name="a2555"></a></span><span class="src-str"> <span class="src-var">$start</span> = <span class="src-var">$es_pos</span> + <span class="src-var">$escape</span><span class="src-sym">[</span><span class="src-str">'length'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2556"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2557"></a></span><span class="src-str"> <span class="src-comm">//Copy the remainder of the string ...</span></span></div></li> -<li><div class="src-line"><a name="a2558"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$string</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$start</span><span class="src-sym">,</span> <span class="src-var">$close_pos</span> - <span class="src-var">$start</span> + <span class="src-var">$char_len</span><span class="src-sym">))</span> . <span class="src-str">'</span>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2559"></a></span><span class="src-str"> <span class="src-var">$start</span> = <span class="src-var">$close_pos</span> + <span class="src-var">$char_len</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2560"></a></span><span class="src-str"> <span class="src-var">$string_open</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2561"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2562"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">while</span><span class="src-sym">(</span><span class="src-var">$string_open</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2563"></a> </div></li> -<li><div class="src-line"><a name="a2564"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$check_linenumbers</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2565"></a></span><span class="src-str"> <span class="src-comm">// Are line numbers used? If, we should end the string before</span></span></div></li> -<li><div class="src-line"><a name="a2566"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// the newline and begin it again (so when <li>s are put in the source</span></span></div></li> -<li><div class="src-line"><a name="a2567"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// remains XHTML compliant)</span></span></div></li> -<li><div class="src-line"><a name="a2568"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// note to self: This opens up possibility of config files specifying</span></span></div></li> -<li><div class="src-line"><a name="a2569"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// that languages can/cannot have multiline strings???</span></span></div></li> -<li><div class="src-line"><a name="a2570"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$string</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-str">"</span></span></span>\n<span<span class="src-var">$string_attributes</span>><span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span> <span class="src-var">$string</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2571"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2572"></a> </div></li> -<li><div class="src-line"><a name="a2573"></a></span><span class="src-str"> <span class="src-var">$result</span> .= <span class="src-var">$string</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2574"></a></span><span class="src-str"> <span class="src-var">$string</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2575"></a></span><span class="src-str"> <span class="src-var">$i</span> = <span class="src-var">$start</span> - <span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2576"></a></span><span class="src-str"> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2577"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'STRINGS'</span><span class="src-sym">]</span> && <span class="src-var">$hq</span> && <span class="src-var">$hq</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> == <span class="src-var">$char</span> &&</span></div></li> -<li><div class="src-line"><a name="a2578"></a></span><span class="src-str"> <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">,</span> <span class="src-var">$hq_strlen</span><span class="src-sym">)</span> == <span class="src-var">$hq</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2579"></a></span><span class="src-str"> <span class="src-comm">// The start of a hard quoted string</span></span></div></li> -<li><div class="src-line"><a name="a2580"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2581"></a></span><span class="src-str"> <span class="src-var">$string_attributes</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'STRINGS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'HARD'</span><span class="src-sym">]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2582"></a></span><span class="src-str"> <span class="src-var">$escape_char_attributes</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'HARD'</span><span class="src-sym">]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2583"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2584"></a></span><span class="src-str"> <span class="src-var">$string_attributes</span> = <span class="src-str">' class="st_h"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2585"></a></span><span class="src-str"> <span class="src-var">$escape_char_attributes</span> = <span class="src-str">' class="es_h"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2586"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2587"></a></span><span class="src-str"> <span class="src-comm">// parse the stuff before this</span></span></div></li> -<li><div class="src-line"><a name="a2588"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$result</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">parse_non_string_part</span><span class="src-sym">(</span><span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2589"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2590"></a> </div></li> -<li><div class="src-line"><a name="a2591"></a></span><span class="src-str"> <span class="src-comm">// now handle the string</span></span></div></li> -<li><div class="src-line"><a name="a2592"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$string</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2593"></a> </div></li> -<li><div class="src-line"><a name="a2594"></a></span><span class="src-str"> <span class="src-comm">// look for closing quote</span></span></div></li> -<li><div class="src-line"><a name="a2595"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$start</span> = <span class="src-var">$i</span> + <span class="src-var">$hq_strlen</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2596"></a></span><span class="src-str"> <span class="src-key">while</span> <span class="src-sym">(</span><span class="src-var">$close_pos</span> = <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'HARDQUOTE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">,</span> <span class="src-var">$start</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2597"></a></span><span class="src-str"> <span class="src-var">$start</span> = <span class="src-var">$close_pos</span> + <span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2598"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span> && <span class="src-var">$part</span><span class="src-sym">[</span><span class="src-var">$close_pos</span> - <span class="src-num">1</span><span class="src-sym">]</span> == <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2599"></a></span><span class="src-str"> <span class="src-comm">// make sure this quote is not escaped</span></span></div></li> -<li><div class="src-line"><a name="a2600"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'HARDESCAPE'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$hardescape</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2601"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$close_pos</span> - <span class="src-num">1</span><span class="src-sym">,</span> <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$hardescape</span><span class="src-sym">))</span> == <span class="src-var">$hardescape</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2602"></a></span><span class="src-str"> <span class="src-comm">// check wether this quote is escaped or if it is something like '\\'</span></span></div></li> -<li><div class="src-line"><a name="a2603"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$escape_char_pos</span> = <span class="src-var">$close_pos</span> - <span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2604"></a></span><span class="src-str"> <span class="src-key">while</span> <span class="src-sym">(</span><span class="src-var">$escape_char_pos</span> > <span class="src-num">0</span></span></div></li> -<li><div class="src-line"><a name="a2605"></a></span><span class="src-str"> && <span class="src-var">$part</span><span class="src-sym">[</span><span class="src-var">$escape_char_pos</span> - <span class="src-num">1</span><span class="src-sym">]</span> == <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2606"></a></span><span class="src-str"> --<span class="src-var">$escape_char_pos</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2607"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2608"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">((</span><span class="src-var">$close_pos</span> - <span class="src-var">$escape_char_pos</span><span class="src-sym">)</span> <span class="src-sym">&</span> <span class="src-num">1</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2609"></a></span><span class="src-str"> <span class="src-comm">// uneven number of escape chars => this quote is escaped</span></span></div></li> -<li><div class="src-line"><a name="a2610"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">continue</span> <span class="src-num">2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2611"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2612"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2613"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2614"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2615"></a> </div></li> -<li><div class="src-line"><a name="a2616"></a></span><span class="src-str"> <span class="src-comm">// found closing quote</span></span></div></li> -<li><div class="src-line"><a name="a2617"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2618"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2619"></a> </div></li> -<li><div class="src-line"><a name="a2620"></a></span><span class="src-str"> <span class="src-comm">//Found the closing delimiter?</span></span></div></li> -<li><div class="src-line"><a name="a2621"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$close_pos</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2622"></a></span><span class="src-str"> <span class="src-comm">// span till the end of this $part when no closing delimiter is found</span></span></div></li> -<li><div class="src-line"><a name="a2623"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$close_pos</span> = <span class="src-var">$length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2624"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2625"></a> </div></li> -<li><div class="src-line"><a name="a2626"></a></span><span class="src-str"> <span class="src-comm">//Get the actual string</span></span></div></li> -<li><div class="src-line"><a name="a2627"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$string</span> = <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">,</span> <span class="src-var">$close_pos</span> - <span class="src-var">$i</span> + <span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2628"></a></span><span class="src-str"> <span class="src-var">$i</span> = <span class="src-var">$close_pos</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2629"></a> </div></li> -<li><div class="src-line"><a name="a2630"></a></span><span class="src-str"> <span class="src-comm">// handle escape chars and encode html chars</span></span></div></li> -<li><div class="src-line"><a name="a2631"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// (special because when we have escape chars within our string they may not be escaped)</span></span></div></li> -<li><div class="src-line"><a name="a2632"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span> && <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2633"></a></span><span class="src-str"> <span class="src-var">$start</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2634"></a></span><span class="src-str"> <span class="src-var">$new_string</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2635"></a></span><span class="src-str"> <span class="src-key">while</span> <span class="src-sym">(</span><span class="src-var">$es_pos</span> = <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">,</span> <span class="src-var">$start</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2636"></a></span><span class="src-str"> <span class="src-comm">// hmtl escape stuff before</span></span></div></li> -<li><div class="src-line"><a name="a2637"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$new_string</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span> <span class="src-var">$start</span><span class="src-sym">,</span> <span class="src-var">$es_pos</span> - <span class="src-var">$start</span><span class="src-sym">))</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2638"></a></span><span class="src-str"> <span class="src-comm">// check if this is a hard escape</span></span></div></li> -<li><div class="src-line"><a name="a2639"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'HARDESCAPE'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$hardescape</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2640"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span> <span class="src-var">$es_pos</span><span class="src-sym">,</span> <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$hardescape</span><span class="src-sym">))</span> == <span class="src-var">$hardescape</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2641"></a></span><span class="src-str"> <span class="src-comm">// indeed, this is a hardescape</span></span></div></li> -<li><div class="src-line"><a name="a2642"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$new_string</span> .= <span class="src-str">"</span></span><span<span class="src-var">$escape_char_attributes</span>><span class="src-str">" </span><span class="src-str">.</span></div></li> -<li><div class="src-line"><a name="a2643"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$hardescape</span><span class="src-sym">)</span> . <span class="src-str">'</span>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2644"></a></span><span class="src-str"> <span class="src-var">$start</span> = <span class="src-var">$es_pos</span> + <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$hardescape</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2645"></a></span><span class="src-str"> <span class="src-key">continue</span> <span class="src-num">2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2646"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2647"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2648"></a></span><span class="src-str"> <span class="src-comm">// not a hard escape, but a normal escape</span></span></div></li> -<li><div class="src-line"><a name="a2649"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// they come in pairs of two</span></span></div></li> -<li><div class="src-line"><a name="a2650"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$c</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2651"></a></span><span class="src-str"> <span class="src-key">while</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">[</span><span class="src-var">$es_pos</span> + <span class="src-var">$c</span><span class="src-sym">]</span><span class="src-sym">)</span> && isset<span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">[</span><span class="src-var">$es_pos</span> + <span class="src-var">$c</span> + <span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span></span></div></li> -<li><div class="src-line"><a name="a2652"></a></span><span class="src-str"> && <span class="src-var">$string</span><span class="src-sym">[</span><span class="src-var">$es_pos</span> + <span class="src-var">$c</span><span class="src-sym">]</span> == <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span></span></div></li> -<li><div class="src-line"><a name="a2653"></a></span><span class="src-str"> && <span class="src-var">$string</span><span class="src-sym">[</span><span class="src-var">$es_pos</span> + <span class="src-var">$c</span> + <span class="src-num">1</span><span class="src-sym">]</span> == <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2654"></a></span><span class="src-str"> <span class="src-var">$c</span> += <span class="src-num">2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2655"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2656"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$c</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2657"></a></span><span class="src-str"> <span class="src-var">$new_string</span> .= <span class="src-str">"</span></span><span<span class="src-var">$escape_char_attributes</span>><span class="src-str">" </span><span class="src-str">.</span></div></li> -<li><div class="src-line"><a name="a2658"></a></span><span class="src-str"> <span class="src-id">str_repeat</span><span class="src-sym">(</span><span class="src-var">$escaped_escape_char</span><span class="src-sym">,</span> <span class="src-var">$c</span><span class="src-sym">)</span> .</span></div></li> -<li><div class="src-line"><a name="a2659"></a></span><span class="src-str"> <span class="src-str">'</span>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2660"></a></span><span class="src-str"> <span class="src-var">$start</span> = <span class="src-var">$es_pos</span> + <span class="src-var">$c</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2661"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2662"></a></span><span class="src-str"> <span class="src-comm">// this is just a single lonely escape char...</span></span></div></li> -<li><div class="src-line"><a name="a2663"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$new_string</span> .= <span class="src-var">$escaped_escape_char</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2664"></a></span><span class="src-str"> <span class="src-var">$start</span> = <span class="src-var">$es_pos</span> + <span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2665"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2666"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2667"></a></span><span class="src-str"> <span class="src-var">$string</span> = <span class="src-var">$new_string</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span> <span class="src-var">$start</span><span class="src-sym">))</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2668"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2669"></a></span><span class="src-str"> <span class="src-var">$string</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2670"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2671"></a> </div></li> -<li><div class="src-line"><a name="a2672"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$check_linenumbers</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2673"></a></span><span class="src-str"> <span class="src-comm">// Are line numbers used? If, we should end the string before</span></span></div></li> -<li><div class="src-line"><a name="a2674"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// the newline and begin it again (so when <li>s are put in the source</span></span></div></li> -<li><div class="src-line"><a name="a2675"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// remains XHTML compliant)</span></span></div></li> -<li><div class="src-line"><a name="a2676"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// note to self: This opens up possibility of config files specifying</span></span></div></li> -<li><div class="src-line"><a name="a2677"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// that languages can/cannot have multiline strings???</span></span></div></li> -<li><div class="src-line"><a name="a2678"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$string</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-str">"</span></span></span>\n<span<span class="src-var">$string_attributes</span>><span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span> <span class="src-var">$string</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2679"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2680"></a> </div></li> -<li><div class="src-line"><a name="a2681"></a></span><span class="src-str"> <span class="src-var">$result</span> .= </span><span class="src-str">"</span><span<span class="src-var">$string_attributes</span>><span class="src-str">" </span><span class="src-str">. <span class="src-var">$string</span> . <span class="src-str">'</span>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2682"></a></span><span class="src-str"> <span class="src-var">$string</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2683"></a></span><span class="src-str"> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2684"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2685"></a></span><span class="src-str"> <span class="src-comm">//Have a look for regexp comments</span></span></div></li> -<li><div class="src-line"><a name="a2686"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$i</span> == <span class="src-var">$next_comment_regexp_pos</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2687"></a></span><span class="src-str"> <span class="src-var">$COMMENT_MATCHED</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2688"></a></span><span class="src-str"> <span class="src-var">$comment</span> = <span class="src-var">$comment_regexp_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$next_comment_regexp_key</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2689"></a></span><span class="src-str"> <span class="src-var">$test_str</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">,</span> <span class="src-var">$comment</span><span class="src-sym">[</span><span class="src-str">'length'</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2690"></a> </div></li> -<li><div class="src-line"><a name="a2691"></a></span><span class="src-str"> <span class="src-comm">//@todo If remove important do remove here</span></span></div></li> -<li><div class="src-line"><a name="a2692"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'MULTI'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2693"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2694"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$comment</span><span class="src-sym">[</span><span class="src-str">'key'</span><span class="src-sym">]]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2695"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2696"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' class="co'</span> . <span class="src-var">$comment</span><span class="src-sym">[</span><span class="src-str">'key'</span><span class="src-sym">]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2697"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2698"></a> </div></li> -<li><div class="src-line"><a name="a2699"></a></span><span class="src-str"> <span class="src-var">$test_str</span> = <span class="src-str">"</span></span><span<span class="src-var">$attributes</span>><span class="src-str">" </span><span class="src-str">. <span class="src-var">$test_str</span> . <span class="src-str">"</span>"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2700"></a> </div></li> -<li><div class="src-line"><a name="a2701"></a></span><span class="src-str"> <span class="src-comm">// Short-cut through all the multiline code</span></span></div></li> -<li><div class="src-line"><a name="a2702"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$check_linenumbers</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2703"></a></span><span class="src-str"> <span class="src-comm">// strreplace to put close span and open span around multiline newlines</span></span></div></li> -<li><div class="src-line"><a name="a2704"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$test_str</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2705"></a></span><span class="src-str"> <span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-str">"</span></span></span>\n<span<span class="src-var">$attributes</span>><span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2706"></a></span><span class="src-str"> <span class="src-id">str_replace</span><span class="src-sym">(</span><span class="src-str">"\n "</span><span class="src-sym">,</span> <span class="src-str">"\n&nbsp;"</span><span class="src-sym">,</span> <span class="src-var">$test_str</span><span class="src-sym">)</span></span></div></li> -<li><div class="src-line"><a name="a2707"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2708"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2709"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2710"></a> </div></li> -<li><div class="src-line"><a name="a2711"></a></span><span class="src-str"> <span class="src-var">$i</span> += <span class="src-var">$comment</span><span class="src-sym">[</span><span class="src-str">'length'</span><span class="src-sym">]</span> - <span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2712"></a> </div></li> -<li><div class="src-line"><a name="a2713"></a></span><span class="src-str"> <span class="src-comm">// parse the rest</span></span></div></li> -<li><div class="src-line"><a name="a2714"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$result</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">parse_non_string_part</span><span class="src-sym">(</span><span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2715"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2716"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2717"></a> </div></li> -<li><div class="src-line"><a name="a2718"></a></span><span class="src-str"> <span class="src-comm">// If we haven't matched a regexp comment, try multi-line comments</span></span></div></li> -<li><div class="src-line"><a name="a2719"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$COMMENT_MATCHED</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2720"></a></span><span class="src-str"> <span class="src-comm">// Is this a multiline comment?</span></span></div></li> -<li><div class="src-line"><a name="a2721"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'COMMENT_MULTI'</span><span class="src-sym">]</span><span class="src-sym">)</span> && <span class="src-var">$next_comment_multi_pos</span> < <span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2722"></a></span><span class="src-str"> <span class="src-var">$next_comment_multi_pos</span> = <span class="src-var">$length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2723"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'COMMENT_MULTI'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$open</span> => <span class="src-var">$close</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2724"></a></span><span class="src-str"> <span class="src-var">$match_i</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2725"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$comment_multi_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span><span class="src-sym">)</span> &&</span></div></li> -<li><div class="src-line"><a name="a2726"></a></span><span class="src-str"> <span class="src-sym">(</span><span class="src-var">$comment_multi_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span> >= <span class="src-var">$i</span> ||</span></div></li> -<li><div class="src-line"><a name="a2727"></a></span><span class="src-str"> <span class="src-var">$comment_multi_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span> === <span class="src-id">false</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2728"></a></span><span class="src-str"> <span class="src-comm">// we have already matched something</span></span></div></li> -<li><div class="src-line"><a name="a2729"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$comment_multi_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span> === <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2730"></a></span><span class="src-str"> <span class="src-comm">// this comment is never matched</span></span></div></li> -<li><div class="src-line"><a name="a2731"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2732"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2733"></a></span><span class="src-str"> <span class="src-var">$match_i</span> = <span class="src-var">$comment_multi_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2734"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">((</span><span class="src-var">$match_i</span> = <a href="http://www.php.net/stripos">stripos</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$open</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">))</span> !== <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2735"></a></span><span class="src-str"> <span class="src-var">$comment_multi_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span> = <span class="src-var">$match_i</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2736"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2737"></a></span><span class="src-str"> <span class="src-var">$comment_multi_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2738"></a></span><span class="src-str"> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2739"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2740"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$match_i</span> !== <span class="src-id">false</span> && <span class="src-var">$match_i</span> < <span class="src-var">$next_comment_multi_pos</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2741"></a></span><span class="src-str"> <span class="src-var">$next_comment_multi_pos</span> = <span class="src-var">$match_i</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2742"></a></span><span class="src-str"> <span class="src-var">$next_open_comment_multi</span> = <span class="src-var">$open</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2743"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$match_i</span> === <span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2744"></a></span><span class="src-str"> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2745"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2746"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2747"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2748"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2749"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$i</span> == <span class="src-var">$next_comment_multi_pos</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2750"></a></span><span class="src-str"> <span class="src-var">$open</span> = <span class="src-var">$next_open_comment_multi</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2751"></a></span><span class="src-str"> <span class="src-var">$close</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'COMMENT_MULTI'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$open</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2752"></a></span><span class="src-str"> <span class="src-var">$open_strlen</span> = <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$open</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2753"></a></span><span class="src-str"> <span class="src-var">$close_strlen</span> = <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$close</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2754"></a></span><span class="src-str"> <span class="src-var">$COMMENT_MATCHED</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2755"></a></span><span class="src-str"> <span class="src-var">$test_str_match</span> = <span class="src-var">$open</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2756"></a></span><span class="src-str"> <span class="src-comm">//@todo If remove important do remove here</span></span></div></li> -<li><div class="src-line"><a name="a2757"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'MULTI'</span><span class="src-sym">]</span> ||</span></div></li> -<li><div class="src-line"><a name="a2758"></a></span><span class="src-str"> <span class="src-var">$open</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_START_IMPORTANT">GESHI_START_IMPORTANT</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2759"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$open</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_START_IMPORTANT">GESHI_START_IMPORTANT</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2760"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2761"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'MULTI'</span><span class="src-sym">]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2762"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2763"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' class="coMULTI"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2764"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2765"></a></span><span class="src-str"> <span class="src-var">$test_str</span> = <span class="src-str">"</span></span><span<span class="src-var">$attributes</span>><span class="src-str">" </span><span class="src-str">. <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$open</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2766"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2767"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2768"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">important_styles</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2769"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2770"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' class="imp"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2771"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2772"></a> </div></li> -<li><div class="src-line"><a name="a2773"></a></span><span class="src-str"> <span class="src-comm">// We don't include the start of the comment if it's an</span></span></div></li> -<li><div class="src-line"><a name="a2774"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// "important" part</span></span></div></li> -<li><div class="src-line"><a name="a2775"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$test_str</span> = <span class="src-str">"</span></span><span<span class="src-var">$attributes</span>><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2776"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2777"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2778"></a></span><span class="src-str"> <span class="src-var">$test_str</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$open</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2779"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2780"></a> </div></li> -<li><div class="src-line"><a name="a2781"></a></span><span class="src-str"> <span class="src-var">$close_pos</span> = <span class="src-id">strpos</span><span class="src-sym">(</span> <span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$close</span><span class="src-sym">,</span> <span class="src-var">$i</span> + <span class="src-var">$open_strlen</span> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2782"></a> </div></li> -<li><div class="src-line"><a name="a2783"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$close_pos</span> === <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2784"></a></span><span class="src-str"> <span class="src-var">$close_pos</span> = <span class="src-var">$length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2785"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2786"></a> </div></li> -<li><div class="src-line"><a name="a2787"></a></span><span class="src-str"> <span class="src-comm">// Short-cut through all the multiline code</span></span></div></li> -<li><div class="src-line"><a name="a2788"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$rest_of_comment</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-id">substr</span><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$i</span> + <span class="src-var">$open_strlen</span><span class="src-sym">,</span> <span class="src-var">$close_pos</span> - <span class="src-var">$i</span> - <span class="src-var">$open_strlen</span> + <span class="src-var">$close_strlen</span><span class="src-sym">))</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2789"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">((</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'MULTI'</span><span class="src-sym">]</span> ||</span></div></li> -<li><div class="src-line"><a name="a2790"></a></span><span class="src-str"> <span class="src-var">$test_str_match</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_START_IMPORTANT">GESHI_START_IMPORTANT</a></span><span class="src-sym">)</span> &&</span></div></li> -<li><div class="src-line"><a name="a2791"></a></span><span class="src-str"> <span class="src-var">$check_linenumbers</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2792"></a> </div></li> -<li><div class="src-line"><a name="a2793"></a></span><span class="src-str"> <span class="src-comm">// strreplace to put close span and open span around multiline newlines</span></span></div></li> -<li><div class="src-line"><a name="a2794"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$test_str</span> .= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2795"></a></span><span class="src-str"> <span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-str">"</span></span></span>\n<span<span class="src-var">$attributes</span>><span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a2796"></a></span><span class="src-str"> <span class="src-id">str_replace</span><span class="src-sym">(</span><span class="src-str">"\n "</span><span class="src-sym">,</span> <span class="src-str">"\n&nbsp;"</span><span class="src-sym">,</span> <span class="src-var">$rest_of_comment</span><span class="src-sym">)</span></span></div></li> -<li><div class="src-line"><a name="a2797"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2798"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2799"></a></span><span class="src-str"> <span class="src-var">$test_str</span> .= <span class="src-var">$rest_of_comment</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2800"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2801"></a> </div></li> -<li><div class="src-line"><a name="a2802"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'MULTI'</span><span class="src-sym">]</span> ||</span></div></li> -<li><div class="src-line"><a name="a2803"></a></span><span class="src-str"> <span class="src-var">$test_str_match</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_START_IMPORTANT">GESHI_START_IMPORTANT</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2804"></a></span><span class="src-str"> <span class="src-var">$test_str</span> .= <span class="src-str">'</span>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2805"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2806"></a> </div></li> -<li><div class="src-line"><a name="a2807"></a></span><span class="src-str"> <span class="src-var">$i</span> = <span class="src-var">$close_pos</span> + <span class="src-var">$close_strlen</span> - <span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2808"></a> </div></li> -<li><div class="src-line"><a name="a2809"></a></span><span class="src-str"> <span class="src-comm">// parse the rest</span></span></div></li> -<li><div class="src-line"><a name="a2810"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$result</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">parse_non_string_part</span><span class="src-sym">(</span><span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2811"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2812"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2813"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2814"></a> </div></li> -<li><div class="src-line"><a name="a2815"></a></span><span class="src-str"> <span class="src-comm">// If we haven't matched a multiline comment, try single-line comments</span></span></div></li> -<li><div class="src-line"><a name="a2816"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$COMMENT_MATCHED</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2817"></a></span><span class="src-str"> <span class="src-comm">// cache potential single line comment occurances</span></span></div></li> -<li><div class="src-line"><a name="a2818"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'COMMENT_SINGLE'</span><span class="src-sym">]</span><span class="src-sym">)</span> && <span class="src-var">$next_comment_single_pos</span> < <span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2819"></a></span><span class="src-str"> <span class="src-var">$next_comment_single_pos</span> = <span class="src-var">$length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2820"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'COMMENT_SINGLE'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$comment_key</span> => <span class="src-var">$comment_mark</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2821"></a></span><span class="src-str"> <span class="src-var">$match_i</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2822"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$comment_single_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span><span class="src-sym">)</span> &&</span></div></li> -<li><div class="src-line"><a name="a2823"></a></span><span class="src-str"> <span class="src-sym">(</span><span class="src-var">$comment_single_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span> >= <span class="src-var">$i</span> ||</span></div></li> -<li><div class="src-line"><a name="a2824"></a></span><span class="src-str"> <span class="src-var">$comment_single_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span> === <span class="src-id">false</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2825"></a></span><span class="src-str"> <span class="src-comm">// we have already matched something</span></span></div></li> -<li><div class="src-line"><a name="a2826"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$comment_single_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span> === <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2827"></a></span><span class="src-str"> <span class="src-comm">// this comment is never matched</span></span></div></li> -<li><div class="src-line"><a name="a2828"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2829"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2830"></a></span><span class="src-str"> <span class="src-var">$match_i</span> = <span class="src-var">$comment_single_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2831"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a2832"></a></span><span class="src-str"> <span class="src-comm">// case sensitive comments</span></span></div></li> -<li><div class="src-line"><a name="a2833"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'CASE_SENSITIVE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">GESHI_COMMENTS</span><span class="src-sym">]</span> &&</span></div></li> -<li><div class="src-line"><a name="a2834"></a></span><span class="src-str"> <span class="src-sym">(</span><span class="src-var">$match_i</span> = <a href="http://www.php.net/stripos">stripos</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$comment_mark</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">))</span> !== <span class="src-id">false</span><span class="src-sym">)</span> ||</span></div></li> -<li><div class="src-line"><a name="a2835"></a></span><span class="src-str"> <span class="src-comm">// non case sensitive</span></span></div></li> -<li><div class="src-line"><a name="a2836"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'CASE_SENSITIVE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">GESHI_COMMENTS</span><span class="src-sym">]</span> &&</span></div></li> -<li><div class="src-line"><a name="a2837"></a></span><span class="src-str"> <span class="src-sym">((</span><span class="src-var">$match_i</span> = <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$comment_mark</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">))</span> !== <span class="src-id">false</span><span class="src-sym">)))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2838"></a></span><span class="src-str"> <span class="src-var">$comment_single_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span> = <span class="src-var">$match_i</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2839"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2840"></a></span><span class="src-str"> <span class="src-var">$comment_single_cache_per_key</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2841"></a></span><span class="src-str"> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2842"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2843"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$match_i</span> !== <span class="src-id">false</span> && <span class="src-var">$match_i</span> < <span class="src-var">$next_comment_single_pos</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2844"></a></span><span class="src-str"> <span class="src-var">$next_comment_single_pos</span> = <span class="src-var">$match_i</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2845"></a></span><span class="src-str"> <span class="src-var">$next_comment_single_key</span> = <span class="src-var">$comment_key</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2846"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$match_i</span> === <span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2847"></a></span><span class="src-str"> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2848"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2849"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2850"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2851"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2852"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$next_comment_single_pos</span> == <span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2853"></a></span><span class="src-str"> <span class="src-var">$comment_key</span> = <span class="src-var">$next_comment_single_key</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2854"></a></span><span class="src-str"> <span class="src-var">$comment_mark</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'COMMENT_SINGLE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2855"></a></span><span class="src-str"> <span class="src-var">$com_len</span> = <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$comment_mark</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2856"></a> </div></li> -<li><div class="src-line"><a name="a2857"></a></span><span class="src-str"> <span class="src-comm">// This check will find special variables like $# in bash</span></span></div></li> -<li><div class="src-line"><a name="a2858"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// or compiler directives of Delphi beginning {$</span></span></div></li> -<li><div class="src-line"><a name="a2859"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">((</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$sc_disallowed_before</span><span class="src-sym">)</span> || <span class="src-sym">(</span><span class="src-var">$i</span> == <span class="src-num">0</span><span class="src-sym">)</span> ||</span></div></li> -<li><div class="src-line"><a name="a2860"></a></span><span class="src-str"> <span class="src-sym">(</span><span class="src-id">false</span> === <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$sc_disallowed_before</span><span class="src-sym">,</span> <span class="src-var">$part</span><span class="src-sym">[</span><span class="src-var">$i</span>-<span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)))</span> &&</span></div></li> -<li><div class="src-line"><a name="a2861"></a></span><span class="src-str"> <span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$sc_disallowed_after</span><span class="src-sym">)</span> || <span class="src-sym">(</span><span class="src-var">$length</span> <= <span class="src-var">$i</span> + <span class="src-var">$com_len</span><span class="src-sym">)</span> ||</span></div></li> -<li><div class="src-line"><a name="a2862"></a></span><span class="src-str"> <span class="src-sym">(</span><span class="src-id">false</span> === <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$sc_disallowed_after</span><span class="src-sym">,</span> <span class="src-var">$part</span><span class="src-sym">[</span><span class="src-var">$i</span> + <span class="src-var">$com_len</span><span class="src-sym">]</span><span class="src-sym">))))</span></span></div></li> -<li><div class="src-line"><a name="a2863"></a></span><span class="src-str"> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2864"></a></span><span class="src-str"> <span class="src-comm">// this is a valid comment</span></span></div></li> -<li><div class="src-line"><a name="a2865"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$COMMENT_MATCHED</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2866"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2867"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2868"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2869"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2870"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' class="co'</span> . <span class="src-var">$comment_key</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2871"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2872"></a></span><span class="src-str"> <span class="src-var">$test_str</span> = <span class="src-str">"</span></span><span<span class="src-var">$attributes</span>><span class="src-str">" </span><span class="src-str">. <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">change_case</span><span class="src-sym">(</span><span class="src-var">$comment_mark</span><span class="src-sym">))</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2873"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2874"></a></span><span class="src-str"> <span class="src-var">$test_str</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$comment_mark</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2875"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2876"></a> </div></li> -<li><div class="src-line"><a name="a2877"></a></span><span class="src-str"> <span class="src-comm">//Check if this comment is the last in the source</span></span></div></li> -<li><div class="src-line"><a name="a2878"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$close_pos</span> = <span class="src-id">strpos</span><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-var">$i</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2879"></a></span><span class="src-str"> <span class="src-var">$oops</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2880"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$close_pos</span> === <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2881"></a></span><span class="src-str"> <span class="src-var">$close_pos</span> = <span class="src-var">$length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2882"></a></span><span class="src-str"> <span class="src-var">$oops</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2883"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2884"></a></span><span class="src-str"> <span class="src-var">$test_str</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$i</span> + <span class="src-var">$com_len</span><span class="src-sym">,</span> <span class="src-var">$close_pos</span> - <span class="src-var">$i</span> - <span class="src-var">$com_len</span><span class="src-sym">))</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2885"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$comment_key</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2886"></a></span><span class="src-str"> <span class="src-var">$test_str</span> .= <span class="src-str">"</span>"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2887"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2888"></a> </div></li> -<li><div class="src-line"><a name="a2889"></a></span><span class="src-str"> <span class="src-comm">// Take into account that the comment might be the last in the source</span></span></div></li> -<li><div class="src-line"><a name="a2890"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$oops</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2891"></a></span><span class="src-str"> <span class="src-var">$test_str</span> .= <span class="src-str">"\n"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2892"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2893"></a> </div></li> -<li><div class="src-line"><a name="a2894"></a></span><span class="src-str"> <span class="src-var">$i</span> = <span class="src-var">$close_pos</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2895"></a> </div></li> -<li><div class="src-line"><a name="a2896"></a></span><span class="src-str"> <span class="src-comm">// parse the rest</span></span></div></li> -<li><div class="src-line"><a name="a2897"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$result</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">parse_non_string_part</span><span class="src-sym">(</span><span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2898"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2899"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2900"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2901"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2902"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2903"></a> </div></li> -<li><div class="src-line"><a name="a2904"></a></span><span class="src-str"> <span class="src-comm">// Where are we adding this char?</span></span></div></li> -<li><div class="src-line"><a name="a2905"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$COMMENT_MATCHED</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2906"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> .= <span class="src-var">$char</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2907"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2908"></a></span><span class="src-str"> <span class="src-var">$result</span> .= <span class="src-var">$test_str</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2909"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$test_str</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2910"></a></span><span class="src-str"> <span class="src-var">$COMMENT_MATCHED</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2911"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2912"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2913"></a></span><span class="src-str"> <span class="src-comm">// Parse the last bit</span></span></div></li> -<li><div class="src-line"><a name="a2914"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$result</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">parse_non_string_part</span><span class="src-sym">(</span><span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2915"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2916"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2917"></a></span><span class="src-str"> <span class="src-var">$result</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2918"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2919"></a></span><span class="src-str"> <span class="src-comm">// Close the <span> that surrounds the block</span></span></div></li> -<li><div class="src-line"><a name="a2920"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$STRICTATTRS</span> != <span class="src-str">''</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2921"></a></span><span class="src-str"> <span class="src-var">$result</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-str">"</span></span></span>\n<span<span class="src-var">$STRICTATTRS</span>><span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span> <span class="src-var">$result</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2922"></a></span><span class="src-str"> <span class="src-var">$result</span> .= <span class="src-str">'</span>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2923"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2924"></a> </div></li> -<li><div class="src-line"><a name="a2925"></a></span><span class="src-str"> <span class="src-var">$endresult</span> .= <span class="src-var">$result</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2926"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$part</span><span class="src-sym">,</span> <span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">,</span> <span class="src-var">$result</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2927"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2928"></a> </div></li> -<li><div class="src-line"><a name="a2929"></a></span><span class="src-str"> <span class="src-comm">//This fix is related to SF#1923020, but has to be applied regardless of</span></span></div></li> -<li><div class="src-line"><a name="a2930"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//actually highlighting symbols.</span></span></div></li> -<li><div class="src-line"><a name="a2931"></a><span class="src-doc">/** NOTE: memorypeak #3 */</span><span class="src-str"><span class="src-comm"></span> </span></span></div></li> -<li><div class="src-line"><a name="a2932"></a></span><span class="src-str"> <span class="src-var">$endresult</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'<SEMI>'</span><span class="src-sym">,</span> <span class="src-str">'<PIPE>'</span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">';'</span><span class="src-sym">,</span> <span class="src-str">'|'</span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-var">$endresult</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2933"></a> </div></li> -<li><div class="src-line"><a name="a2934"></a></span><span class="src-str"><span class="src-comm">// // Parse the last stuff (redundant?)</span></span></div></li> -<li><div class="src-line"><a name="a2935"></a></span><span class="src-str"><span class="src-comm">// $result .= $this->parse_non_string_part($stuff_to_parse);</span></span></div></li> -<li><div class="src-line"><a name="a2936"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a2937"></a></span><span class="src-str"> <span class="src-comm">// Lop off the very first and last spaces</span></span></div></li> -<li><div class="src-line"><a name="a2938"></a></span><span class="src-str"><span class="src-comm">// $result = substr($result, 1, -1);</span></span></div></li> -<li><div class="src-line"><a name="a2939"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a2940"></a></span><span class="src-str"> <span class="src-comm">// We're finished: stop timing</span></span></div></li> -<li><div class="src-line"><a name="a2941"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">set_time</span><span class="src-sym">(</span><span class="src-var">$start_time</span><span class="src-sym">,</span> <a href="http://www.php.net/microtime">microtime</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2942"></a> </div></li> -<li><div class="src-line"><a name="a2943"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">finalise</span><span class="src-sym">(</span><span class="src-var">$endresult</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2944"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$endresult</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2945"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2946"></a> </div></li> -<li><div class="src-line"><a name="a2947"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a2948"></a><span class="src-doc"> * Swaps out spaces and tabs for HTML indentation. Not needed if</span></div></li> -<li><div class="src-line"><a name="a2949"></a><span class="src-doc"> * the code is in a pre block...</span></div></li> -<li><div class="src-line"><a name="a2950"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a2951"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc"> </span><span class="src-doc-type">string </span><span class="src-doc">The source to indent (reference!)</span></div></li> -<li><div class="src-line"><a name="a2952"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a2953"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></div></li> -<li><div class="src-line"><a name="a2954"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a2955"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">indent</span><span class="src-sym">(</span><span class="src-sym">&</span><span class="src-var">$result</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2956"></a></span><span class="src-str"> <span class="src-comm">/// Replace tabs with the correct number of spaces</span></span></div></li> -<li><div class="src-line"><a name="a2957"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-id">false</span> !== <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$result</span><span class="src-sym">,</span> <span class="src-str">"\t"</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2958"></a></span><span class="src-str"> <span class="src-var">$lines</span> = <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-var">$result</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2959"></a></span><span class="src-str"> <span class="src-var">$result</span> = <span class="src-id">null</span><span class="src-sym">;</span><span class="src-comm">//Save memory while we process the lines individually</span></span></div></li> -<li><div class="src-line"><a name="a2960"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$tab_width</span> = <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodget_real_tab_width">get_real_tab_width</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2961"></a></span><span class="src-str"> <span class="src-var">$tab_string</span> = <span class="src-str">'&nbsp;'</span> . <a href="http://www.php.net/str_repeat">str_repeat</a><span class="src-sym">(</span><span class="src-str">' '</span><span class="src-sym">,</span> <span class="src-var">$tab_width</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2962"></a> </div></li> -<li><div class="src-line"><a name="a2963"></a></span><span class="src-str"> <span class="src-key">for</span> <span class="src-sym">(</span><span class="src-var">$key</span> = <span class="src-num">0</span><span class="src-sym">,</span> <span class="src-var">$n</span> = <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$lines</span><span class="src-sym">)</span><span class="src-sym">;</span> <span class="src-var">$key</span> < <span class="src-var">$n</span><span class="src-sym">;</span> <span class="src-var">$key</span>++<span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2964"></a></span><span class="src-str"> <span class="src-var">$line</span> = <span class="src-var">$lines</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2965"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-id">false</span> === <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">,</span> <span class="src-str">"\t"</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2966"></a></span><span class="src-str"> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2967"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2968"></a> </div></li> -<li><div class="src-line"><a name="a2969"></a></span><span class="src-str"> <span class="src-var">$pos</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2970"></a></span><span class="src-str"> <span class="src-var">$length</span> = <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2971"></a></span><span class="src-str"> <span class="src-var">$lines</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-str">''</span><span class="src-sym">;</span> <span class="src-comm">// reduce memory</span></span></div></li> -<li><div class="src-line"><a name="a2972"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a2973"></a></span><span class="src-str"> <span class="src-var">$IN_TAG</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2974"></a></span><span class="src-str"> <span class="src-key">for</span> <span class="src-sym">(</span><span class="src-var">$i</span> = <span class="src-num">0</span><span class="src-sym">;</span> <span class="src-var">$i</span> < <span class="src-var">$length</span><span class="src-sym">;</span> ++<span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2975"></a></span><span class="src-str"> <span class="src-var">$char</span> = <span class="src-var">$line</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2976"></a></span><span class="src-str"> <span class="src-comm">// Simple engine to work out whether we're in a tag.</span></span></div></li> -<li><div class="src-line"><a name="a2977"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// If we are we modify $pos. This is so we ignore HTML</span></span></div></li> -<li><div class="src-line"><a name="a2978"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// in the line and only workout the tab replacement</span></span></div></li> -<li><div class="src-line"><a name="a2979"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// via the actual content of the string</span></span></div></li> -<li><div class="src-line"><a name="a2980"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// This test could be improved to include strings in the</span></span></div></li> -<li><div class="src-line"><a name="a2981"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// html so that < or > would be allowed in user's styles</span></span></div></li> -<li><div class="src-line"><a name="a2982"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// (e.g. quotes: '<' '>'; or similar)</span></span></div></li> -<li><div class="src-line"><a name="a2983"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$IN_TAG</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2984"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-str">'>'</span> == <span class="src-var">$char</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2985"></a></span><span class="src-str"> <span class="src-var">$IN_TAG</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2986"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2987"></a></span><span class="src-str"> <span class="src-var">$lines</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> .= <span class="src-var">$char</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2988"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-str">'<'</span> == <span class="src-var">$char</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2989"></a></span><span class="src-str"> <span class="src-var">$IN_TAG</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2990"></a></span><span class="src-str"> <span class="src-var">$lines</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> .= <span class="src-str">'<'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2991"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-str">'&'</span> == <span class="src-var">$char</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2992"></a></span><span class="src-str"> <span class="src-var">$substr</span> = <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">,</span> <span class="src-var">$i</span> + <span class="src-num">3</span><span class="src-sym">,</span> <span class="src-num">5</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2993"></a></span><span class="src-str"> <span class="src-var">$posi</span> = <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$substr</span><span class="src-sym">,</span> <span class="src-str">';'</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2994"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-id">false</span> === <span class="src-var">$posi</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2995"></a></span><span class="src-str"> ++<span class="src-var">$pos</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2996"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a2997"></a></span><span class="src-str"> <span class="src-var">$pos</span> -= <span class="src-var">$posi</span>+<span class="src-num">2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a2998"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a2999"></a></span><span class="src-str"> <span class="src-var">$lines</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> .= <span class="src-var">$char</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3000"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-str">"\t"</span> == <span class="src-var">$char</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3001"></a></span><span class="src-str"> <span class="src-var">$str</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3002"></a></span><span class="src-str"> <span class="src-comm">// OPTIMISE - move $strs out. Make an array:</span></span></div></li> -<li><div class="src-line"><a name="a3003"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// $tabs = array(</span></span></div></li> -<li><div class="src-line"><a name="a3004"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// 1 => '&nbsp;',</span></span></div></li> -<li><div class="src-line"><a name="a3005"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// 2 => '&nbsp; ',</span></span></div></li> -<li><div class="src-line"><a name="a3006"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// 3 => '&nbsp; &nbsp;' etc etc</span></span></div></li> -<li><div class="src-line"><a name="a3007"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// to use instead of building a string every time</span></span></div></li> -<li><div class="src-line"><a name="a3008"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$tab_end_width</span> = <span class="src-var">$tab_width</span> - <span class="src-sym">(</span><span class="src-var">$pos</span> % <span class="src-var">$tab_width</span><span class="src-sym">)</span><span class="src-sym">;</span> <span class="src-comm">//Moved out of the look as it doesn't change within the loop</span></span></div></li> -<li><div class="src-line"><a name="a3009"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">((</span><span class="src-var">$pos</span> <span class="src-sym">&</span> <span class="src-num">1</span><span class="src-sym">)</span> || <span class="src-num">1</span> == <span class="src-var">$tab_end_width</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3010"></a></span><span class="src-str"> <span class="src-var">$str</span> .= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$tab_string</span><span class="src-sym">,</span> <span class="src-num">6</span><span class="src-sym">,</span> <span class="src-var">$tab_end_width</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3011"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3012"></a></span><span class="src-str"> <span class="src-var">$str</span> .= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$tab_string</span><span class="src-sym">,</span> <span class="src-num">0</span><span class="src-sym">,</span> <span class="src-var">$tab_end_width</span>+<span class="src-num">5</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3013"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3014"></a></span><span class="src-str"> <span class="src-var">$lines</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> .= <span class="src-var">$str</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3015"></a></span><span class="src-str"> <span class="src-var">$pos</span> += <span class="src-var">$tab_end_width</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3016"></a> </div></li> -<li><div class="src-line"><a name="a3017"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-id">false</span> === <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">,</span> <span class="src-str">"\t"</span><span class="src-sym">,</span> <span class="src-var">$i</span> + <span class="src-num">1</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3018"></a></span><span class="src-str"> <span class="src-var">$lines</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> .= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">,</span> <span class="src-var">$i</span> + <span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3019"></a></span><span class="src-str"> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3020"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3021"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-num">0</span> == <span class="src-var">$pos</span> && <span class="src-str">' '</span> == <span class="src-var">$char</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3022"></a></span><span class="src-str"> <span class="src-var">$lines</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> .= <span class="src-str">'&nbsp;'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3023"></a></span><span class="src-str"> ++<span class="src-var">$pos</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3024"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3025"></a></span><span class="src-str"> <span class="src-var">$lines</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> .= <span class="src-var">$char</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3026"></a></span><span class="src-str"> ++<span class="src-var">$pos</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3027"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3028"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3029"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3030"></a></span><span class="src-str"> <span class="src-var">$result</span> = <a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-var">$lines</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3031"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$lines</span><span class="src-sym">)</span><span class="src-sym">;</span><span class="src-comm">//We don't need the lines separated beyond this --- free them!</span></span></div></li> -<li><div class="src-line"><a name="a3032"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3033"></a></span><span class="src-str"> <span class="src-comm">// Other whitespace</span></span></div></li> -<li><div class="src-line"><a name="a3034"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// BenBE: Fix to reduce the number of replacements to be done</span></span></div></li> -<li><div class="src-line"><a name="a3035"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$result</span> = <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'/^ /m'</span><span class="src-sym">,</span> <span class="src-str">'&nbsp;'</span><span class="src-sym">,</span> <span class="src-var">$result</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3036"></a></span><span class="src-str"> <span class="src-var">$result</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">' '</span><span class="src-sym">,</span> <span class="src-str">' &nbsp;'</span><span class="src-sym">,</span> <span class="src-var">$result</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3037"></a> </div></li> -<li><div class="src-line"><a name="a3038"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3039"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_ending</span> === <span class="src-id">null</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3040"></a></span><span class="src-str"> <span class="src-var">$result</span> = <a href="http://www.php.net/nl2br">nl2br</a><span class="src-sym">(</span><span class="src-var">$result</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3041"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3042"></a></span><span class="src-str"> <span class="src-var">$result</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_ending</span><span class="src-sym">,</span> <span class="src-var">$result</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3043"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3044"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3045"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3046"></a> </div></li> -<li><div class="src-line"><a name="a3047"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a3048"></a><span class="src-doc"> * Changes the case of a keyword for those languages where a change is asked for</span></div></li> -<li><div class="src-line"><a name="a3049"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a3050"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc"> </span><span class="src-doc-type">string </span><span class="src-doc">The keyword to change the case of</span></div></li> -<li><div class="src-line"><a name="a3051"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span><span class="src-doc">The keyword with its case changed</span></div></li> -<li><div class="src-line"><a name="a3052"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a3053"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></div></li> -<li><div class="src-line"><a name="a3054"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a3055"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">change_case</span><span class="src-sym">(</span><span class="src-var">$instr</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3056"></a></span><span class="src-str"> <span class="src-key">switch</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'CASE_KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3057"></a></span><span class="src-str"> <span class="src-key">case</span> <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_CAPS_UPPER">GESHI_CAPS_UPPER</a></span>:</span></div></li> -<li><div class="src-line"><a name="a3058"></a></span><span class="src-str"> <span class="src-key">return</span> <a href="http://www.php.net/strtoupper">strtoupper</a><span class="src-sym">(</span><span class="src-var">$instr</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3059"></a></span><span class="src-str"> <span class="src-key">case</span> <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_CAPS_LOWER">GESHI_CAPS_LOWER</a></span>:</span></div></li> -<li><div class="src-line"><a name="a3060"></a></span><span class="src-str"> <span class="src-key">return</span> <a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$instr</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3061"></a></span><span class="src-str"> <span class="src-key">default</span>:</span></div></li> -<li><div class="src-line"><a name="a3062"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$instr</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3063"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3064"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3065"></a> </div></li> -<li><div class="src-line"><a name="a3066"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a3067"></a><span class="src-doc"> * Handles replacements of keywords to include markup and links if requested</span></div></li> -<li><div class="src-line"><a name="a3068"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a3069"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc"> </span><span class="src-doc-type">string </span><span class="src-doc">The keyword to add the Markup to</span></div></li> -<li><div class="src-line"><a name="a3070"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">The </span><span class="src-doc">HTML for the match found</span></div></li> -<li><div class="src-line"><a name="a3071"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.8</span></div></li> -<li><div class="src-line"><a name="a3072"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></div></li> -<li><div class="src-line"><a name="a3073"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a3074"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Get rid of ender in keyword links</span></div></li> -<li><div class="src-line"><a name="a3075"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a3076"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">handle_keyword_replace</span><span class="src-sym">(</span><span class="src-var">$match</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3077"></a></span><span class="src-str"> <span class="src-var">$k</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_kw_replace_group</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3078"></a></span><span class="src-str"> <span class="src-var">$keyword</span> = <span class="src-var">$match</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3079"></a> </div></li> -<li><div class="src-line"><a name="a3080"></a></span><span class="src-str"> <span class="src-var">$before</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3081"></a></span><span class="src-str"> <span class="src-var">$after</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3082"></a> </div></li> -<li><div class="src-line"><a name="a3083"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">keyword_links</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3084"></a></span><span class="src-str"> <span class="src-comm">// Keyword links have been ebabled</span></span></div></li> -<li><div class="src-line"><a name="a3085"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a3086"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'URLS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">)</span> &&</span></div></li> -<li><div class="src-line"><a name="a3087"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'URLS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span> != <span class="src-str">''</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3088"></a></span><span class="src-str"> <span class="src-comm">// There is a base group for this keyword</span></span></div></li> -<li><div class="src-line"><a name="a3089"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a3090"></a></span><span class="src-str"> <span class="src-comm">// Old system: strtolower</span></span></div></li> -<li><div class="src-line"><a name="a3091"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//$keyword = ( $this->language_data['CASE_SENSITIVE'][$group] ) ? $keyword : strtolower($keyword);</span></span></div></li> -<li><div class="src-line"><a name="a3092"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// New system: get keyword from language file to get correct case</span></span></div></li> -<li><div class="src-line"><a name="a3093"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'CASE_SENSITIVE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span> &&</span></div></li> -<li><div class="src-line"><a name="a3094"></a></span><span class="src-str"> <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'URLS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">,</span> <span class="src-str">'{FNAME}'</span><span class="src-sym">)</span> !== <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3095"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$word</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3096"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/strcasecmp">strcasecmp</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">,</span> <span class="src-var">$keyword</span><span class="src-sym">)</span> == <span class="src-num">0</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3097"></a></span><span class="src-str"> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3098"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3099"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3100"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3101"></a></span><span class="src-str"> <span class="src-var">$word</span> = <span class="src-var">$keyword</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3102"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3103"></a> </div></li> -<li><div class="src-line"><a name="a3104"></a></span><span class="src-str"> <span class="src-var">$before</span> = <span class="src-str">'<|UR1|"'</span> .</span></div></li> -<li><div class="src-line"><a name="a3105"></a></span><span class="src-str"> <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a3106"></a></span><span class="src-str"> <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a3107"></a></span><span class="src-str"> <span class="src-str">'{FNAME}'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3108"></a></span><span class="src-str"> <span class="src-str">'{FNAMEL}'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3109"></a></span><span class="src-str"> <span class="src-str">'{FNAMEU}'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3110"></a></span><span class="src-str"> <span class="src-str">'.'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3111"></a></span><span class="src-str"> <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a3112"></a></span><span class="src-str"> <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">'+'</span><span class="src-sym">,</span> <span class="src-str">'%20'</span><span class="src-sym">,</span> <a href="http://www.php.net/urlencode">urlencode</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">)))</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3113"></a></span><span class="src-str"> <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">'+'</span><span class="src-sym">,</span> <span class="src-str">'%20'</span><span class="src-sym">,</span> <a href="http://www.php.net/urlencode">urlencode</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">))))</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3114"></a></span><span class="src-str"> <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">'+'</span><span class="src-sym">,</span> <span class="src-str">'%20'</span><span class="src-sym">,</span> <a href="http://www.php.net/urlencode">urlencode</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><a href="http://www.php.net/strtoupper">strtoupper</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">))))</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3115"></a></span><span class="src-str"> <span class="src-str">'<DOT>'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3116"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'URLS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span></span></div></li> -<li><div class="src-line"><a name="a3117"></a></span><span class="src-str"> <span class="src-sym">)</span> . <span class="src-str">'">'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3118"></a></span><span class="src-str"> <span class="src-var">$after</span> = <span class="src-str">'</a>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3119"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3120"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3121"></a> </div></li> -<li><div class="src-line"><a name="a3122"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$before</span> . <span class="src-str">'<|/'</span>. <span class="src-var">$k</span> .<span class="src-str">'/>'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">change_case</span><span class="src-sym">(</span><span class="src-var">$keyword</span><span class="src-sym">)</span> . <span class="src-str">'|>'</span> . <span class="src-var">$after</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3123"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3124"></a> </div></li> -<li><div class="src-line"><a name="a3125"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a3126"></a><span class="src-doc"> * handles regular expressions highlighting-definitions with callback functions</span></div></li> -<li><div class="src-line"><a name="a3127"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a3128"></a><span class="src-doc"> * </span><span class="src-doc-tag">@note</span><span class="src-doc"> this is a callback, don't use it directly</span></div></li> -<li><div class="src-line"><a name="a3129"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a3130"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc">the matches array</span></div></li> -<li><div class="src-line"><a name="a3131"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">The </span><span class="src-doc">highlighted string</span></div></li> -<li><div class="src-line"><a name="a3132"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.8</span></div></li> -<li><div class="src-line"><a name="a3133"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></div></li> -<li><div class="src-line"><a name="a3134"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a3135"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">handle_regexps_callback</span><span class="src-sym">(</span><span class="src-var">$matches</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3136"></a></span><span class="src-str"> <span class="src-comm">// before: "' style=\"' . call_user_func(\"$func\", '\\1') . '\"\\1|>'",</span></span></div></li> -<li><div class="src-line"><a name="a3137"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">return</span> <span class="src-str">' style="'</span> . <a href="http://www.php.net/call_user_func">call_user_func</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_rx_key</span><span class="src-sym">]</span><span class="src-sym">,</span> <span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span> . <span class="src-str">'"'</span>. <span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span> . <span class="src-str">'|>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3138"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3139"></a> </div></li> -<li><div class="src-line"><a name="a3140"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a3141"></a><span class="src-doc"> * handles newlines in REGEXPS matches. Set the _hmr_* vars before calling this</span></div></li> -<li><div class="src-line"><a name="a3142"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a3143"></a><span class="src-doc"> * </span><span class="src-doc-tag">@note</span><span class="src-doc"> this is a callback, don't use it directly</span></div></li> -<li><div class="src-line"><a name="a3144"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a3145"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc">the matches array</span></div></li> -<li><div class="src-line"><a name="a3146"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li> -<li><div class="src-line"><a name="a3147"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.8</span></div></li> -<li><div class="src-line"><a name="a3148"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></div></li> -<li><div class="src-line"><a name="a3149"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a3150"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">handle_multiline_regexps</span><span class="src-sym">(</span><span class="src-var">$matches</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3151"></a></span><span class="src-str"> <span class="src-var">$before</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_before</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3152"></a></span><span class="src-str"> <span class="src-var">$after</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_after</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3153"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_replace</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3154"></a></span><span class="src-str"> <span class="src-var">$replace</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_replace</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3155"></a></span><span class="src-str"> <span class="src-var">$search</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3156"></a> </div></li> -<li><div class="src-line"><a name="a3157"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><a href="http://www.php.net/array_keys">array_keys</a><span class="src-sym">(</span><span class="src-var">$matches</span><span class="src-sym">)</span> <span class="src-key">as</span> <span class="src-var">$k</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3158"></a></span><span class="src-str"> <span class="src-var">$search</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'\\'</span> . <span class="src-var">$k</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3159"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3160"></a> </div></li> -<li><div class="src-line"><a name="a3161"></a></span><span class="src-str"> <span class="src-var">$before</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-var">$search</span><span class="src-sym">,</span> <span class="src-var">$matches</span><span class="src-sym">,</span> <span class="src-var">$before</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3162"></a></span><span class="src-str"> <span class="src-var">$after</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-var">$search</span><span class="src-sym">,</span> <span class="src-var">$matches</span><span class="src-sym">,</span> <span class="src-var">$after</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3163"></a></span><span class="src-str"> <span class="src-var">$replace</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-var">$search</span><span class="src-sym">,</span> <span class="src-var">$matches</span><span class="src-sym">,</span> <span class="src-var">$replace</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3164"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3165"></a></span><span class="src-str"> <span class="src-var">$replace</span> = <span class="src-var">$matches</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3166"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3167"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$before</span></span></div></li> -<li><div class="src-line"><a name="a3168"></a></span><span class="src-str"> . <span class="src-str">'<|!REG3XP'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_key</span> .<span class="src-str">'!>'</span></span></div></li> -<li><div class="src-line"><a name="a3169"></a></span><span class="src-str"> . <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-str">"|>\n<|!REG3XP"</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_key</span> . <span class="src-str">'!>'</span><span class="src-sym">,</span> <span class="src-var">$replace</span><span class="src-sym">)</span></span></div></li> -<li><div class="src-line"><a name="a3170"></a></span><span class="src-str"> . <span class="src-str">'|>'</span></span></div></li> -<li><div class="src-line"><a name="a3171"></a></span><span class="src-str"> . <span class="src-var">$after</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3172"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3173"></a> </div></li> -<li><div class="src-line"><a name="a3174"></a><span class="src-doc">/**</span><span class="src-str"> </span></span></div></li> -<li><div class="src-line"><a name="a3175"></a><span class="src-doc"> * Takes a string that has no strings or comments in it, and highlights</span></div></li> -<li><div class="src-line"><a name="a3176"></a><span class="src-doc"> * stuff like keywords, numbers and methods.</span></div></li> -<li><div class="src-line"><a name="a3177"></a><span class="src-doc"> *</span></div></li> -<li><div class="src-line"><a name="a3178"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">The string to parse for keyword, numbers etc.</span></div></li> -<li><div class="src-line"><a name="a3179"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@since</span><span class="src-doc"> 1.0.0</span></div></li> -<li><div class="src-line"><a name="a3180"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></div></li> -<li><div class="src-line"><a name="a3181"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> BUGGY! Why? Why not build string and return?</span></div></li> -<li><div class="src-line"><a name="a3182"></a><span class="src-doc"> */</span><span class="src-str"></span></span></div></li> -<li><div class="src-line"><a name="a3183"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">parse_non_string_part</span><span class="src-sym">(</span><span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3184"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <span class="src-str">' '</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3185"></a> </div></li> -<li><div class="src-line"><a name="a3186"></a></span><span class="src-str"> <span class="src-comm">// Regular expressions</span></span></div></li> -<li><div class="src-line"><a name="a3187"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$key</span> => <span class="src-var">$regexp</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3188"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3189"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$regexp</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3190"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3191"></a></span><span class="src-str"> <span class="src-comm">// produce valid HTML when we match multiple lines</span></span></div></li> -<li><div class="src-line"><a name="a3192"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_replace</span> = <span class="src-var">$regexp</span><span class="src-sym">[</span><span class="src-id">GESHI_REPLACE</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3193"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_before</span> = <span class="src-var">$regexp</span><span class="src-sym">[</span><span class="src-id">GESHI_BEFORE</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3194"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_key</span> = <span class="src-var">$key</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3195"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_after</span> = <span class="src-var">$regexp</span><span class="src-sym">[</span><span class="src-id">GESHI_AFTER</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3196"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/preg_replace_callback">preg_replace_callback</a><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a3197"></a></span><span class="src-str"> <span class="src-str">"/"</span> . <span class="src-var">$regexp</span><span class="src-sym">[</span><span class="src-id">GESHI_SEARCH</span><span class="src-sym">]</span> . <span class="src-str">"</span></span>/{<span class="src-var">$regexp</span><span class="src-sym">[</span><span class="src-id">GESHI_MODIFIERS</span><span class="src-sym">]</span><span class="src-sym">}</span><span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3198"></a></span><span class="src-str"> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">,</span> <span class="src-str">'handle_multiline_regexps'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3199"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3200"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_replace</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3201"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_before</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3202"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_after</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3203"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3204"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a3205"></a></span><span class="src-str"> <span class="src-str">'/'</span> . <span class="src-var">$regexp</span><span class="src-sym">[</span><span class="src-id">GESHI_SEARCH</span><span class="src-sym">]</span> . <span class="src-str">'/'</span> . <span class="src-var">$regexp</span><span class="src-sym">[</span><span class="src-id">GESHI_MODIFIERS</span><span class="src-sym">]</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3206"></a></span><span class="src-str"> <span class="src-var">$regexp</span><span class="src-sym">[</span><span class="src-id">GESHI_BEFORE</span><span class="src-sym">]</span> . <span class="src-str">'<|!REG3XP'</span>. <span class="src-var">$key</span> .<span class="src-str">'!>'</span> . <span class="src-var">$regexp</span><span class="src-sym">[</span><span class="src-id">GESHI_REPLACE</span><span class="src-sym">]</span> . <span class="src-str">'|>'</span> . <span class="src-var">$regexp</span><span class="src-sym">[</span><span class="src-id">GESHI_AFTER</span><span class="src-sym">]</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3207"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3208"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3209"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3210"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3211"></a></span><span class="src-str"> <span class="src-comm">// produce valid HTML when we match multiple lines</span></span></div></li> -<li><div class="src-line"><a name="a3212"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_key</span> = <span class="src-var">$key</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3213"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/preg_replace_callback">preg_replace_callback</a><span class="src-sym">(</span> <span class="src-str">"/("</span> . <span class="src-var">$regexp</span> . <span class="src-str">")/"</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3214"></a></span><span class="src-str"> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">,</span> <span class="src-str">'handle_multiline_regexps'</span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3215"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_hmr_key</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3216"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3217"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span> <span class="src-str">"/("</span> . <span class="src-var">$regexp</span> . <span class="src-str">")/"</span><span class="src-sym">,</span> <span class="src-str">"</span></span><|!REG3XP<span class="src-var">$key</span>!>\\1|><span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3218"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3219"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3220"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3221"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3222"></a> </div></li> -<li><div class="src-line"><a name="a3223"></a></span><span class="src-str"> <span class="src-comm">// Highlight numbers. As of 1.0.8 we support diffent types of numbers</span></span></div></li> -<li><div class="src-line"><a name="a3224"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$numbers_found</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3225"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span> && <a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">'#\d#'</span><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span> <span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3226"></a></span><span class="src-str"> <span class="src-var">$numbers_found</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3227"></a> </div></li> -<li><div class="src-line"><a name="a3228"></a></span><span class="src-str"> <span class="src-comm">//For each of the formats ...</span></span></div></li> -<li><div class="src-line"><a name="a3229"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS_RXCACHE'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$id</span> => <span class="src-var">$regexp</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3230"></a></span><span class="src-str"> <span class="src-comm">//Check if it should be highlighted ...</span></span></div></li> -<li><div class="src-line"><a name="a3231"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-var">$regexp</span><span class="src-sym">,</span> <span class="src-str">"</span></span><|/NUM!<span class="src-var">$id</span>/>\\1|><span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3232"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3233"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3234"></a> </div></li> -<li><div class="src-line"><a name="a3235"></a></span><span class="src-str"> <span class="src-comm">// Highlight keywords</span></span></div></li> -<li><div class="src-line"><a name="a3236"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$disallowed_before</span> = <span class="src-str">"(?<![a-zA-Z0-9\$_\|\#;>|^&"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3237"></a></span><span class="src-str"> <span class="src-var">$disallowed_after</span> = <span class="src-str">"(?![a-zA-Z0-9_\|%\\-&;"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3238"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'STRINGS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3239"></a></span><span class="src-str"> <span class="src-var">$quotemarks</span> = <a href="http://www.php.net/preg_quote">preg_quote</a><span class="src-sym">(</span><a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'QUOTEMARKS'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-str">'/'</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3240"></a></span><span class="src-str"> <span class="src-var">$disallowed_before</span> .= <span class="src-var">$quotemarks</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3241"></a></span><span class="src-str"> <span class="src-var">$disallowed_after</span> .= <span class="src-var">$quotemarks</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3242"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3243"></a></span><span class="src-str"> <span class="src-var">$disallowed_before</span> .= <span class="src-str">"])"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3244"></a></span><span class="src-str"> <span class="src-var">$disallowed_after</span> .= <span class="src-str">"])"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3245"></a> </div></li> -<li><div class="src-line"><a name="a3246"></a></span><span class="src-str"> <span class="src-var">$parser_control_pergroup</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3247"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3248"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3249"></a></span><span class="src-str"> <span class="src-var">$x</span> = <span class="src-num">0</span><span class="src-sym">;</span> <span class="src-comm">// check wether per-keyword-group parser_control is enabled</span></span></div></li> -<li><div class="src-line"><a name="a3250"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'DISALLOWED_BEFORE'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3251"></a></span><span class="src-str"> <span class="src-var">$disallowed_before</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'DISALLOWED_BEFORE'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3252"></a></span><span class="src-str"> ++<span class="src-var">$x</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3253"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3254"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'DISALLOWED_AFTER'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3255"></a></span><span class="src-str"> <span class="src-var">$disallowed_after</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'DISALLOWED_AFTER'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3256"></a></span><span class="src-str"> ++<span class="src-var">$x</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3257"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3258"></a></span><span class="src-str"> <span class="src-var">$parser_control_pergroup</span> = <span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">)</span> - <span class="src-var">$x</span><span class="src-sym">)</span> > <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3259"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3260"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3261"></a> </div></li> -<li><div class="src-line"><a name="a3262"></a></span><span class="src-str"> <span class="src-comm">// if this is changed, don't forget to change it below</span></span></div></li> -<li><div class="src-line"><a name="a3263"></a></span><span class="src-str"><span class="src-comm">// if (!empty($disallowed_before)) {</span></span></div></li> -<li><div class="src-line"><a name="a3264"></a></span><span class="src-str"><span class="src-comm">// $disallowed_before = "(?<![$disallowed_before])";</span></span></div></li> -<li><div class="src-line"><a name="a3265"></a></span><span class="src-str"><span class="src-comm">// }</span></span></div></li> -<li><div class="src-line"><a name="a3266"></a></span><span class="src-str"><span class="src-comm">// if (!empty($disallowed_after)) {</span></span></div></li> -<li><div class="src-line"><a name="a3267"></a></span><span class="src-str"><span class="src-comm">// $disallowed_after = "(?![$disallowed_after])";</span></span></div></li> -<li><div class="src-line"><a name="a3268"></a></span><span class="src-str"><span class="src-comm">// }</span></span></div></li> -<li><div class="src-line"><a name="a3269"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a3270"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><a href="http://www.php.net/array_keys">array_keys</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-key">as</span> <span class="src-var">$k</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3271"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">)</span> ||</span></div></li> -<li><div class="src-line"><a name="a3272"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3273"></a> </div></li> -<li><div class="src-line"><a name="a3274"></a></span><span class="src-str"> <span class="src-var">$case_sensitive</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'CASE_SENSITIVE'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3275"></a></span><span class="src-str"> <span class="src-var">$modifiers</span> = <span class="src-var">$case_sensitive</span> ? <span class="src-str">''</span> : <span class="src-str">'i'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3276"></a> </div></li> -<li><div class="src-line"><a name="a3277"></a></span><span class="src-str"> <span class="src-comm">// NEW in 1.0.8 - per-keyword-group parser control</span></span></div></li> -<li><div class="src-line"><a name="a3278"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$disallowed_before_local</span> = <span class="src-var">$disallowed_before</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3279"></a></span><span class="src-str"> <span class="src-var">$disallowed_after_local</span> = <span class="src-var">$disallowed_after</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3280"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$parser_control_pergroup</span> && isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3281"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'DISALLOWED_BEFORE'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3282"></a></span><span class="src-str"> <span class="src-var">$disallowed_before_local</span> =</span></div></li> -<li><div class="src-line"><a name="a3283"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'DISALLOWED_BEFORE'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3284"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3285"></a> </div></li> -<li><div class="src-line"><a name="a3286"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'DISALLOWED_AFTER'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3287"></a></span><span class="src-str"> <span class="src-var">$disallowed_after_local</span> =</span></div></li> -<li><div class="src-line"><a name="a3288"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'DISALLOWED_AFTER'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3289"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3290"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3291"></a> </div></li> -<li><div class="src-line"><a name="a3292"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_kw_replace_group</span> = <span class="src-var">$k</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3293"></a> </div></li> -<li><div class="src-line"><a name="a3294"></a></span><span class="src-str"> <span class="src-comm">//NEW in 1.0.8, the cached regexp list</span></span></div></li> -<li><div class="src-line"><a name="a3295"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// since we don't want PHP / PCRE to crash due to too large patterns we split them into smaller chunks</span></span></div></li> -<li><div class="src-line"><a name="a3296"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">for</span> <span class="src-sym">(</span><span class="src-var">$set</span> = <span class="src-num">0</span><span class="src-sym">,</span> <span class="src-var">$set_length</span> = <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'CACHED_KEYWORD_LISTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span> <span class="src-var">$set</span> < <span class="src-var">$set_length</span><span class="src-sym">;</span> ++<span class="src-var">$set</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3297"></a></span><span class="src-str"> <span class="src-var">$keywordset</span> =<span class="src-sym">&</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'CACHED_KEYWORD_LISTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$set</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3298"></a></span><span class="src-str"> <span class="src-comm">// Might make a more unique string for putting the number in soon</span></span></div></li> -<li><div class="src-line"><a name="a3299"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// Basically, we don't put the styles in yet because then the styles themselves will</span></span></div></li> -<li><div class="src-line"><a name="a3300"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// get highlighted if the language has a CSS keyword in it (like CSS, for example ;))</span></span></div></li> -<li><div class="src-line"><a name="a3301"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/preg_replace_callback">preg_replace_callback</a><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a3302"></a></span><span class="src-str"> <span class="src-str">"</span></span>/<span class="src-var">$disallowed_before_local</span>({<span class="src-var">$keywordset</span><span class="src-sym">}</span>)(?!\<DOT\>(?:htm|php))<span class="src-var">$disallowed_after_local</span>/<span class="src-var">$modifiers</span><span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3303"></a></span><span class="src-str"> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">,</span> <span class="src-str">'handle_keyword_replace'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3304"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span></span></div></li> -<li><div class="src-line"><a name="a3305"></a></span><span class="src-str"> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3306"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3307"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3308"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3309"></a> </div></li> -<li><div class="src-line"><a name="a3310"></a></span><span class="src-str"> <span class="src-comm">//</span></span></div></li> -<li><div class="src-line"><a name="a3311"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// Now that's all done, replace /[number]/ with the correct styles</span></span></div></li> -<li><div class="src-line"><a name="a3312"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//</span></span></div></li> -<li><div class="src-line"><a name="a3313"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">foreach</span> <span class="src-sym">(</span><a href="http://www.php.net/array_keys">array_keys</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-key">as</span> <span class="src-var">$k</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3314"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3315"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' style="'</span> .</span></div></li> -<li><div class="src-line"><a name="a3316"></a></span><span class="src-str"> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">)</span> ?</span></div></li> -<li><div class="src-line"><a name="a3317"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span> : <span class="src-str">""</span><span class="src-sym">)</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3318"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3319"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' class="kw'</span> . <span class="src-var">$k</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3320"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3321"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">"</span></span><|/<span class="src-var">$k</span>/><span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span> </span><span class="src-str">"</span><|<span class="src-var">$attributes</span>><span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3322"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3323"></a> </div></li> -<li><div class="src-line"><a name="a3324"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$numbers_found</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3325"></a></span><span class="src-str"> <span class="src-comm">// Put number styles in</span></span></div></li> -<li><div class="src-line"><a name="a3326"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS_RXCACHE'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$id</span> => <span class="src-var">$regexp</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3327"></a></span><span class="src-str"><span class="src-comm">//Commented out for now, as this needs some review ...</span></span></div></li> -<li><div class="src-line"><a name="a3328"></a></span><span class="src-str"><span class="src-comm">// if ($numbers_permissions & $id) {</span></span></div></li> -<li><div class="src-line"><a name="a3329"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//Get the appropriate style ...</span></span></div></li> -<li><div class="src-line"><a name="a3330"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//Checking for unset styles is done by the style cache builder ...</span></span></div></li> -<li><div class="src-line"><a name="a3331"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3332"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3333"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3334"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' class="nu'</span>.<span class="src-var">$id</span>.<span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3335"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3336"></a> </div></li> -<li><div class="src-line"><a name="a3337"></a></span><span class="src-str"> <span class="src-comm">//Set in the correct styles ...</span></span></div></li> -<li><div class="src-line"><a name="a3338"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">"</span></span>/NUM!<span class="src-var">$id</span>/<span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span> <span class="src-var">$attributes</span><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3339"></a></span><span class="src-str"><span class="src-comm">// }</span></span></div></li> -<li><div class="src-line"><a name="a3340"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3341"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3342"></a> </div></li> -<li><div class="src-line"><a name="a3343"></a></span><span class="src-str"> <span class="src-comm">// Highlight methods and fields in objects</span></span></div></li> -<li><div class="src-line"><a name="a3344"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'METHODS'</span><span class="src-sym">]</span> && <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'OOLANG'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3345"></a></span><span class="src-str"> <span class="src-var">$oolang_spaces</span> = <span class="src-str">"[\s]*"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3346"></a></span><span class="src-str"> <span class="src-var">$oolang_before</span> = <span class="src-str">""</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3347"></a></span><span class="src-str"> <span class="src-var">$oolang_after</span> = <span class="src-str">"[a-zA-Z][a-zA-Z0-9_]*"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3348"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3349"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'OOLANG'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3350"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'OOLANG'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'MATCH_BEFORE'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3351"></a></span><span class="src-str"> <span class="src-var">$oolang_before</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'OOLANG'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'MATCH_BEFORE'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3352"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3353"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'OOLANG'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'MATCH_AFTER'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3354"></a></span><span class="src-str"> <span class="src-var">$oolang_after</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'OOLANG'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'MATCH_AFTER'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3355"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3356"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'OOLANG'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'MATCH_SPACES'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3357"></a></span><span class="src-str"> <span class="src-var">$oolang_spaces</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'OOLANG'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'MATCH_SPACES'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3358"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3359"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3360"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3361"></a> </div></li> -<li><div class="src-line"><a name="a3362"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'OBJECT_SPLITTERS'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$key</span> => <span class="src-var">$splitter</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3363"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-id">false</span> !== <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$stuff_to_parse</span><span class="src-sym">,</span> <span class="src-var">$splitter</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3364"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3365"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'METHODS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3366"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3367"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' class="me'</span> . <span class="src-var">$key</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3368"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3369"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">"</span></span>/(<span class="src-var">$oolang_before</span>)(<span class="src-str">" </span><span class="src-str">. <span class="src-id">preg_quote</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'OBJECT_SPLITTERS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">,</span> <span class="src-str">'/'</span><span class="src-sym">)</span> . <span class="src-str">"</span></span>)(<span class="src-var">$oolang_spaces</span>)(<span class="src-var">$oolang_after</span>)/<span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span> </span><span class="src-str">"</span>\\1\\2\\3<|<span class="src-var">$attributes</span>>\\4|><span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3370"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3371"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3372"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3373"></a> </div></li> -<li><div class="src-line"><a name="a3374"></a></span><span class="src-str"> <span class="src-comm">//</span></span></div></li> -<li><div class="src-line"><a name="a3375"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// Highlight brackets. Yes, I've tried adding a semi-colon to this list.</span></span></div></li> -<li><div class="src-line"><a name="a3376"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// You try it, and see what happens ;)</span></span></div></li> -<li><div class="src-line"><a name="a3377"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// TODO: Fix lexic permissions not converting entities if shouldn't</span></span></div></li> -<li><div class="src-line"><a name="a3378"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// be highlighting regardless</span></span></div></li> -<li><div class="src-line"><a name="a3379"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//</span></span></div></li> -<li><div class="src-line"><a name="a3380"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3381"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'CACHE_BRACKET_MATCH'</span><span class="src-sym">]</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3382"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'CACHE_BRACKET_REPLACE'</span><span class="src-sym">]</span><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3383"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3384"></a> </div></li> -<li><div class="src-line"><a name="a3385"></a> </div></li> -<li><div class="src-line"><a name="a3386"></a></span><span class="src-str"> <span class="src-comm">//FIX for symbol highlighting ...</span></span></div></li> -<li><div class="src-line"><a name="a3387"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'SYMBOLS'</span><span class="src-sym">]</span> && <span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOLS'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3388"></a></span><span class="src-str"> <span class="src-comm">//Get all matches and throw away those witin a block that is already highlighted... (i.e. matched by a regexp)</span></span></div></li> -<li><div class="src-line"><a name="a3389"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$n_symbols</span> = <a href="http://www.php.net/preg_match_all">preg_match_all</a><span class="src-sym">(</span><span class="src-str">"/<\|(?:<DOT>|[^>])+>(?:(?!\|>).*?)\|>|<\/a>|(?:"</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOL_SEARCH'</span><span class="src-sym">]</span> . <span class="src-str">")+/"</span><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span><span class="src-sym">,</span> <span class="src-var">$pot_symbols</span><span class="src-sym">,</span> <span class="src-id">PREG_OFFSET_CAPTURE</span> | <span class="src-id">PREG_SET_ORDER</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3390"></a></span><span class="src-str"> <span class="src-var">$global_offset</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3391"></a></span><span class="src-str"> <span class="src-key">for</span> <span class="src-sym">(</span><span class="src-var">$s_id</span> = <span class="src-num">0</span><span class="src-sym">;</span> <span class="src-var">$s_id</span> < <span class="src-var">$n_symbols</span><span class="src-sym">;</span> ++<span class="src-var">$s_id</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3392"></a></span><span class="src-str"> <span class="src-var">$symbol_match</span> = <span class="src-var">$pot_symbols</span><span class="src-sym">[</span><span class="src-var">$s_id</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3393"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$symbol_match</span><span class="src-sym">,</span> <span class="src-str">'<'</span><span class="src-sym">)</span> !== <span class="src-id">false</span> || <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$symbol_match</span><span class="src-sym">,</span> <span class="src-str">'>'</span><span class="src-sym">)</span> !== <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3394"></a></span><span class="src-str"> <span class="src-comm">// already highlighted blocks _must_ include either < or ></span></span></div></li> -<li><div class="src-line"><a name="a3395"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// so if this conditional applies, we have to skip this match</span></span></div></li> -<li><div class="src-line"><a name="a3396"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// BenBE: UNLESS the block contains <SEMI> or <PIPE></span></span></div></li> -<li><div class="src-line"><a name="a3397"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$symbol_match</span><span class="src-sym">,</span> <span class="src-str">'<SEMI>'</span><span class="src-sym">)</span> === <span class="src-id">false</span> &&</span></div></li> -<li><div class="src-line"><a name="a3398"></a></span><span class="src-str"> <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$symbol_match</span><span class="src-sym">,</span> <span class="src-str">'<PIPE>'</span><span class="src-sym">)</span> === <span class="src-id">false</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3399"></a></span><span class="src-str"> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3400"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3401"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3402"></a> </div></li> -<li><div class="src-line"><a name="a3403"></a></span><span class="src-str"> <span class="src-comm">// if we reach this point, we have a valid match which needs to be highlighted</span></span></div></li> -<li><div class="src-line"><a name="a3404"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a3405"></a></span><span class="src-str"> <span class="src-var">$symbol_length</span> = <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$symbol_match</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3406"></a></span><span class="src-str"> <span class="src-var">$symbol_offset</span> = <span class="src-var">$pot_symbols</span><span class="src-sym">[</span><span class="src-var">$s_id</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3407"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$pot_symbols</span><span class="src-sym">[</span><span class="src-var">$s_id</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3408"></a></span><span class="src-str"> <span class="src-var">$symbol_end</span> = <span class="src-var">$symbol_length</span> + <span class="src-var">$symbol_offset</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3409"></a></span><span class="src-str"> <span class="src-var">$symbol_hl</span> = <span class="src-str">""</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3410"></a> </div></li> -<li><div class="src-line"><a name="a3411"></a></span><span class="src-str"> <span class="src-comm">// if we have multiple styles, we have to handle them properly</span></span></div></li> -<li><div class="src-line"><a name="a3412"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'MULTIPLE_SYMBOL_GROUPS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3413"></a></span><span class="src-str"> <span class="src-var">$old_sym</span> = -<span class="src-num">1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3414"></a></span><span class="src-str"> <span class="src-comm">// Split the current stuff to replace into its atomic symbols ...</span></span></div></li> -<li><div class="src-line"><a name="a3415"></a></span><span class="src-str"><span class="src-comm"></span> <a href="http://www.php.net/preg_match_all">preg_match_all</a><span class="src-sym">(</span><span class="src-str">"/"</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOL_SEARCH'</span><span class="src-sym">]</span> . <span class="src-str">"/"</span><span class="src-sym">,</span> <span class="src-var">$symbol_match</span><span class="src-sym">,</span> <span class="src-var">$sym_match_syms</span><span class="src-sym">,</span> <span class="src-id">PREG_PATTERN_ORDER</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3416"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$sym_match_syms</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$sym_ms</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3417"></a></span><span class="src-str"> <span class="src-comm">//Check if consequtive symbols belong to the same group to save output ...</span></span></div></li> -<li><div class="src-line"><a name="a3418"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOL_DATA'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$sym_ms</span><span class="src-sym">]</span><span class="src-sym">)</span></span></div></li> -<li><div class="src-line"><a name="a3419"></a></span><span class="src-str"> && <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOL_DATA'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$sym_ms</span><span class="src-sym">]</span> != <span class="src-var">$old_sym</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3420"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>-<span class="src-num">1</span> != <span class="src-var">$old_sym</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3421"></a></span><span class="src-str"> <span class="src-var">$symbol_hl</span> .= <span class="src-str">"|>"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3422"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3423"></a></span><span class="src-str"> <span class="src-var">$old_sym</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'SYMBOL_DATA'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$sym_ms</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3424"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3425"></a></span><span class="src-str"> <span class="src-var">$symbol_hl</span> .= <span class="src-str">'<| style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'SYMBOLS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$old_sym</span><span class="src-sym">]</span> . <span class="src-str">'">'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3426"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3427"></a></span><span class="src-str"> <span class="src-var">$symbol_hl</span> .= <span class="src-str">'<| class="sy'</span> . <span class="src-var">$old_sym</span> . <span class="src-str">'">'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3428"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3429"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3430"></a></span><span class="src-str"> <span class="src-var">$symbol_hl</span> .= <span class="src-var">$sym_ms</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3431"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3432"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$sym_match_syms</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3433"></a> </div></li> -<li><div class="src-line"><a name="a3434"></a></span><span class="src-str"> <span class="src-comm">//Close remaining tags and insert the replacement at the right position ...</span></span></div></li> -<li><div class="src-line"><a name="a3435"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//Take caution if symbol_hl is empty to avoid doubled closing spans.</span></span></div></li> -<li><div class="src-line"><a name="a3436"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span>-<span class="src-num">1</span> != <span class="src-var">$old_sym</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3437"></a></span><span class="src-str"> <span class="src-var">$symbol_hl</span> .= <span class="src-str">"|>"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3438"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3439"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3440"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3441"></a></span><span class="src-str"> <span class="src-var">$symbol_hl</span> = <span class="src-str">'<| style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'SYMBOLS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> . <span class="src-str">'">'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3442"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3443"></a></span><span class="src-str"> <span class="src-var">$symbol_hl</span> = <span class="src-str">'<| class="sy0">'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3444"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3445"></a></span><span class="src-str"> <span class="src-var">$symbol_hl</span> .= <span class="src-var">$symbol_match</span> . <span class="src-str">'|>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3446"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3447"></a> </div></li> -<li><div class="src-line"><a name="a3448"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/substr_replace">substr_replace</a><span class="src-sym">(</span><span class="src-var">$stuff_to_parse</span><span class="src-sym">,</span> <span class="src-var">$symbol_hl</span><span class="src-sym">,</span> <span class="src-var">$symbol_offset</span> + <span class="src-var">$global_offset</span><span class="src-sym">,</span> <span class="src-var">$symbol_length</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3449"></a> </div></li> -<li><div class="src-line"><a name="a3450"></a></span><span class="src-str"> <span class="src-comm">// since we replace old text with something of different size,</span></span></div></li> -<li><div class="src-line"><a name="a3451"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// we'll have to keep track of the differences</span></span></div></li> -<li><div class="src-line"><a name="a3452"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$global_offset</span> += <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$symbol_hl</span><span class="src-sym">)</span> - <span class="src-var">$symbol_length</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3453"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3454"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3455"></a></span><span class="src-str"> <span class="src-comm">//FIX for symbol highlighting ...</span></span></div></li> -<li><div class="src-line"><a name="a3456"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a3457"></a></span><span class="src-str"> <span class="src-comm">// Add class/style for regexps</span></span></div></li> -<li><div class="src-line"><a name="a3458"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">foreach</span> <span class="src-sym">(</span><a href="http://www.php.net/array_keys">array_keys</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-key">as</span> <span class="src-var">$key</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3459"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3460"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/is_callable">is_callable</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3461"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_rx_key</span> = <span class="src-var">$key</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3462"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/preg_replace_callback">preg_replace_callback</a><span class="src-sym">(</span><span class="src-str">"</span></span>/!REG3XP<span class="src-var">$key</span>!(.*)\|>/U<span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3463"></a></span><span class="src-str"> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">,</span> <span class="src-str">'handle_regexps_callback'</span><span class="src-sym">)</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a3464"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3465"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3466"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3467"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3468"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3469"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span> &&</span></div></li> -<li><div class="src-line"><a name="a3470"></a></span><span class="src-str"> <a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-id">GESHI_CLASS</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3471"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' class="'</span> .</span></div></li> -<li><div class="src-line"><a name="a3472"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">GESHI_CLASS</span><span class="src-sym">]</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3473"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3474"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' class="re'</span> . <span class="src-var">$key</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3475"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3476"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3477"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">"</span></span>!REG3XP<span class="src-var">$key</span>!<span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span> </span><span class="src-str">"</span><span class="src-var">$attributes</span><span class="src-str">"</span><span class="src-str"><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3478"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3479"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3480"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3481"></a> </div></li> -<li><div class="src-line"><a name="a3482"></a></span><span class="src-str"> <span class="src-comm">// Replace <DOT> with . for urls</span></span></div></li> -<li><div class="src-line"><a name="a3483"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$stuff_to_parse</span> = <span class="src-id">str_replace</span><span class="src-sym">(</span><span class="src-str">'<DOT>'</span><span class="src-sym">,</span> <span class="src-str">'.'</span><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3484"></a></span><span class="src-str"> <span class="src-comm">// Replace <|UR1| with <a href= for urls also</span></span></div></li> -<li><div class="src-line"><a name="a3485"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">link_styles</span><span class="src-sym">[</span><span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_LINK">GESHI_LINK</a></span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3486"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3487"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">'<|UR1|'</span><span class="src-sym">,</span> <span class="src-str">'<a'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">link_target</span> . <span class="src-str">' href='</span><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3488"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3489"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">'<|UR1|'</span><span class="src-sym">,</span> <span class="src-str">'<a'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">link_target</span> . <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">link_styles</span><span class="src-sym">[</span><span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_LINK">GESHI_LINK</a></span><span class="src-sym">]</span> . <span class="src-str">'" href='</span><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3490"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3491"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3492"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">'<|UR1|'</span><span class="src-sym">,</span> <span class="src-str">'<a'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">link_target</span> . <span class="src-str">' href='</span><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3493"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3494"></a> </div></li> -<li><div class="src-line"><a name="a3495"></a></span><span class="src-str"> <span class="src-comm">//</span></span></div></li> -<li><div class="src-line"><a name="a3496"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// NOW we add the span thingy ;)</span></span></div></li> -<li><div class="src-line"><a name="a3497"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//</span></span></div></li> -<li><div class="src-line"><a name="a3498"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a3499"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">'<|'</span><span class="src-sym">,</span> <span class="src-str">'<span'</span><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3500"></a></span><span class="src-str"> <span class="src-var">$stuff_to_parse</span> = <a href="http://www.php.net/str_replace">str_replace</a> <span class="src-sym">(</span> <span class="src-str">'|>'</span><span class="src-sym">,</span> <span class="src-str">'</span>'</span><span class="src-sym">,</span> <span class="src-var">$stuff_to_parse</span> <span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3501"></a></span><span class="src-str"> <span class="src-key">return</span> <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$stuff_to_parse</span><span class="src-sym">,</span> <span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3502"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3503"></a> </div></li> -<li><div class="src-line"><a name="a3504"></a></span><span class="src-str"> /**</span></div></li> -<li><div class="src-line"><a name="a3505"></a></span><span class="src-str"> * Sets the time taken to parse the code</span></div></li> -<li><div class="src-line"><a name="a3506"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a3507"></a></span><span class="src-str"> * @param microtime The time when parsing started</span></div></li> -<li><div class="src-line"><a name="a3508"></a></span><span class="src-str"> * @param microtime The time when parsing ended</span></div></li> -<li><div class="src-line"><a name="a3509"></a></span><span class="src-str"> * @since 1.0.2</span></div></li> -<li><div class="src-line"><a name="a3510"></a></span><span class="src-str"> * @access private</span></div></li> -<li><div class="src-line"><a name="a3511"></a></span><span class="src-str"> */</span></div></li> -<li><div class="src-line"><a name="a3512"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">set_time</span><span class="src-sym">(</span><span class="src-var">$start_time</span><span class="src-sym">,</span> <span class="src-var">$end_time</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3513"></a></span><span class="src-str"> <span class="src-var">$start</span> = <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">' '</span><span class="src-sym">,</span> <span class="src-var">$start_time</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3514"></a></span><span class="src-str"> <span class="src-var">$end</span> = <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">' '</span><span class="src-sym">,</span> <span class="src-var">$end_time</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3515"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><a href="http://www.php.net/time">time</a> = <span class="src-var">$end</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> + <span class="src-var">$end</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span> - <span class="src-var">$start</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span> - <span class="src-var">$start</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3516"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3517"></a> </div></li> -<li><div class="src-line"><a name="a3518"></a></span><span class="src-str"> /**</span></div></li> -<li><div class="src-line"><a name="a3519"></a></span><span class="src-str"> * Gets the time taken to parse the code</span></div></li> -<li><div class="src-line"><a name="a3520"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a3521"></a></span><span class="src-str"> * @return double The time taken to parse the code</span></div></li> -<li><div class="src-line"><a name="a3522"></a></span><span class="src-str"> * @since 1.0.2</span></div></li> -<li><div class="src-line"><a name="a3523"></a></span><span class="src-str"> */</span></div></li> -<li><div class="src-line"><a name="a3524"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodget_time">get_time</a><span class="src-sym">(</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3525"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$this</span><span class="src-sym">-></span><a href="http://www.php.net/time">time</a><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3526"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3527"></a> </div></li> -<li><div class="src-line"><a name="a3528"></a></span><span class="src-str"> /**</span></div></li> -<li><div class="src-line"><a name="a3529"></a></span><span class="src-str"> * Merges arrays recursively, overwriting values of the first array with values of later arrays</span></div></li> -<li><div class="src-line"><a name="a3530"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a3531"></a></span><span class="src-str"> * @since 1.0.8</span></div></li> -<li><div class="src-line"><a name="a3532"></a></span><span class="src-str"> * @access private</span></div></li> -<li><div class="src-line"><a name="a3533"></a></span><span class="src-str"> */</span></div></li> -<li><div class="src-line"><a name="a3534"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">merge_arrays</span><span class="src-sym">(</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3535"></a></span><span class="src-str"> <span class="src-var">$arrays</span> = <a href="http://www.php.net/func_get_args">func_get_args</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3536"></a></span><span class="src-str"> <span class="src-var">$narrays</span> = <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$arrays</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3537"></a> </div></li> -<li><div class="src-line"><a name="a3538"></a></span><span class="src-str"> <span class="src-comm">// check arguments</span></span></div></li> -<li><div class="src-line"><a name="a3539"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// comment out if more performance is necessary (in this case the foreach loop will trigger a warning if the argument is not an array)</span></span></div></li> -<li><div class="src-line"><a name="a3540"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">for</span> <span class="src-sym">(</span><span class="src-var">$i</span> = <span class="src-num">0</span><span class="src-sym">;</span> <span class="src-var">$i</span> < <span class="src-var">$narrays</span><span class="src-sym">;</span> <span class="src-var">$i</span> ++<span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3541"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$arrays</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3542"></a></span><span class="src-str"> <span class="src-comm">// also array_merge_recursive returns nothing in this case</span></span></div></li> -<li><div class="src-line"><a name="a3543"></a></span><span class="src-str"><span class="src-comm"></span> <a href="http://www.php.net/trigger_error">trigger_error</a><span class="src-sym">(</span><span class="src-str">'Argument #'</span> . <span class="src-sym">(</span><span class="src-var">$i</span>+<span class="src-num">1</span><span class="src-sym">)</span> . <span class="src-str">' is not an array - trying to merge array with scalar! Returning false!'</span><span class="src-sym">,</span> <span class="src-id">E_USER_WARNING</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3544"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3545"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3546"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3547"></a> </div></li> -<li><div class="src-line"><a name="a3548"></a></span><span class="src-str"> <span class="src-comm">// the first array is in the output set in every case</span></span></div></li> -<li><div class="src-line"><a name="a3549"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$ret</span> = <span class="src-var">$arrays</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3550"></a> </div></li> -<li><div class="src-line"><a name="a3551"></a></span><span class="src-str"> <span class="src-comm">// merege $ret with the remaining arrays</span></span></div></li> -<li><div class="src-line"><a name="a3552"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">for</span> <span class="src-sym">(</span><span class="src-var">$i</span> = <span class="src-num">1</span><span class="src-sym">;</span> <span class="src-var">$i</span> < <span class="src-var">$narrays</span><span class="src-sym">;</span> <span class="src-var">$i</span> ++<span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3553"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$arrays</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$key</span> => <span class="src-var">$value</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3554"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span> && isset<span class="src-sym">(</span><span class="src-var">$ret</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3555"></a></span><span class="src-str"> <span class="src-comm">// if $ret[$key] is not an array you try to merge an scalar value with an array - the result is not defined (incompatible arrays)</span></span></div></li> -<li><div class="src-line"><a name="a3556"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// in this case the call will trigger an E_USER_WARNING and the $ret[$key] will be false.</span></span></div></li> -<li><div class="src-line"><a name="a3557"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$ret</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">merge_arrays</span><span class="src-sym">(</span><span class="src-var">$ret</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">,</span> <span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3558"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3559"></a></span><span class="src-str"> <span class="src-var">$ret</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-var">$value</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3560"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3561"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3562"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3563"></a> </div></li> -<li><div class="src-line"><a name="a3564"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$ret</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3565"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3566"></a> </div></li> -<li><div class="src-line"><a name="a3567"></a></span><span class="src-str"> /**</span></div></li> -<li><div class="src-line"><a name="a3568"></a></span><span class="src-str"> * Gets language information and stores it for later use</span></div></li> -<li><div class="src-line"><a name="a3569"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a3570"></a></span><span class="src-str"> * @param string The filename of the language file you want to load</span></div></li> -<li><div class="src-line"><a name="a3571"></a></span><span class="src-str"> * @since 1.0.0</span></div></li> -<li><div class="src-line"><a name="a3572"></a></span><span class="src-str"> * @access private</span></div></li> -<li><div class="src-line"><a name="a3573"></a></span><span class="src-str"> * @todo Needs to load keys for lexic permissions for keywords, regexps etc</span></div></li> -<li><div class="src-line"><a name="a3574"></a></span><span class="src-str"> */</span></div></li> -<li><div class="src-line"><a name="a3575"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">load_language</span><span class="src-sym">(</span><span class="src-var">$file_name</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3576"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$file_name</span> == <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">loaded_language</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3577"></a></span><span class="src-str"> <span class="src-comm">// this file is already loaded!</span></span></div></li> -<li><div class="src-line"><a name="a3578"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">return</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3579"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3580"></a> </div></li> -<li><div class="src-line"><a name="a3581"></a></span><span class="src-str"> <span class="src-comm">//Prepare some stuff before actually loading the language file</span></span></div></li> -<li><div class="src-line"><a name="a3582"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">loaded_language</span> = <span class="src-var">$file_name</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3583"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">parse_cache_built</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3584"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodenable_highlighting">enable_highlighting</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3585"></a></span><span class="src-str"> <span class="src-var">$language_data</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3586"></a> </div></li> -<li><div class="src-line"><a name="a3587"></a></span><span class="src-str"> <span class="src-comm">//Load the language file</span></span></div></li> -<li><div class="src-line"><a name="a3588"></a></span><span class="src-str"><span class="src-comm"></span> require <span class="src-var">$file_name</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3589"></a> </div></li> -<li><div class="src-line"><a name="a3590"></a></span><span class="src-str"> <span class="src-comm">// Perhaps some checking might be added here later to check that</span></span></div></li> -<li><div class="src-line"><a name="a3591"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// $language data is a valid thing but maybe not</span></span></div></li> -<li><div class="src-line"><a name="a3592"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span> = <span class="src-var">$language_data</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3593"></a> </div></li> -<li><div class="src-line"><a name="a3594"></a></span><span class="src-str"> <span class="src-comm">// Set strict mode if should be set</span></span></div></li> -<li><div class="src-line"><a name="a3595"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">strict_mode</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STRICT_MODE_APPLIES'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3596"></a> </div></li> -<li><div class="src-line"><a name="a3597"></a></span><span class="src-str"> <span class="src-comm">// Set permissions for all lexics to true</span></span></div></li> -<li><div class="src-line"><a name="a3598"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// so they'll be highlighted by default</span></span></div></li> -<li><div class="src-line"><a name="a3599"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">foreach</span> <span class="src-sym">(</span><a href="http://www.php.net/array_keys">array_keys</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-key">as</span> <span class="src-var">$key</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3600"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3601"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3602"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3603"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-id">false</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3604"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3605"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3606"></a> </div></li> -<li><div class="src-line"><a name="a3607"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><a href="http://www.php.net/array_keys">array_keys</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'COMMENT_SINGLE'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-key">as</span> <span class="src-var">$key</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3608"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3609"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3610"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><a href="http://www.php.net/array_keys">array_keys</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">)</span> <span class="src-key">as</span> <span class="src-var">$key</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3611"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-id">true</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3612"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3613"></a> </div></li> -<li><div class="src-line"><a name="a3614"></a></span><span class="src-str"> <span class="src-comm">// for BenBE and future code reviews:</span></span></div></li> -<li><div class="src-line"><a name="a3615"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// we can use empty here since we only check for existance and emptiness of an array</span></span></div></li> -<li><div class="src-line"><a name="a3616"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// if it is not an array at all but rather false or null this will work as intended as well</span></span></div></li> -<li><div class="src-line"><a name="a3617"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// even if $this->language_data['PARSER_CONTROL'] is undefined this won't trigger a notice</span></span></div></li> -<li><div class="src-line"><a name="a3618"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'ENABLE_FLAGS'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3619"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'ENABLE_FLAGS'</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$flag</span> => <span class="src-var">$value</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3620"></a></span><span class="src-str"> <span class="src-comm">// it's either true or false and maybe is true as well</span></span></div></li> -<li><div class="src-line"><a name="a3621"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$perm</span> = <span class="src-var">$value</span> !== <span class="src-id">GESHI_NEVER</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3622"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$flag</span> == <span class="src-str">'ALL'</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3623"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodenable_highlighting">enable_highlighting</a><span class="src-sym">(</span><span class="src-var">$perm</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3624"></a></span><span class="src-str"> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3625"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3626"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-var">$flag</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3627"></a></span><span class="src-str"> <span class="src-comm">// unknown lexic permission</span></span></div></li> -<li><div class="src-line"><a name="a3628"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">continue</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3629"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3630"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-var">$flag</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3631"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-var">$flag</span><span class="src-sym">]</span> <span class="src-key">as</span> <span class="src-var">$key</span> => <span class="src-var">$val</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3632"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-var">$flag</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span> = <span class="src-var">$perm</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3633"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3634"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3635"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-var">$flag</span><span class="src-sym">]</span> = <span class="src-var">$perm</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3636"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3637"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3638"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'PARSER_CONTROL'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'ENABLE_FLAGS'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3639"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3640"></a> </div></li> -<li><div class="src-line"><a name="a3641"></a></span><span class="src-str"> <span class="src-comm">//NEW in 1.0.8: Allow styles to be loaded from a separate file to override defaults</span></span></div></li> -<li><div class="src-line"><a name="a3642"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$style_filename</span> = <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$file_name</span><span class="src-sym">,</span> <span class="src-num">0</span><span class="src-sym">,</span> -<span class="src-num">4</span><span class="src-sym">)</span> . <span class="src-str">'.style.php'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3643"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/is_readable">is_readable</a><span class="src-sym">(</span><span class="src-var">$style_filename</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3644"></a></span><span class="src-str"> <span class="src-comm">//Clear any style_data that could have been set before ...</span></span></div></li> -<li><div class="src-line"><a name="a3645"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$style_data</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3646"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$style_data</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3647"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3648"></a> </div></li> -<li><div class="src-line"><a name="a3649"></a></span><span class="src-str"> <span class="src-comm">//Read the Style Information from the style file</span></span></div></li> -<li><div class="src-line"><a name="a3650"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-inc">include</span> <span class="src-var">$style_filename</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3651"></a> </div></li> -<li><div class="src-line"><a name="a3652"></a></span><span class="src-str"> <span class="src-comm">//Apply the new styles to our current language styles</span></span></div></li> -<li><div class="src-line"><a name="a3653"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$style_data</span><span class="src-sym">)</span> && <a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$style_data</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3654"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span> =</span></div></li> -<li><div class="src-line"><a name="a3655"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">merge_arrays</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">,</span> <span class="src-var">$style_data</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3656"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3657"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3658"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3659"></a> </div></li> -<li><div class="src-line"><a name="a3660"></a></span><span class="src-str"> /**</span></div></li> -<li><div class="src-line"><a name="a3661"></a></span><span class="src-str"> * Takes the parsed code and various options, and creates the HTML</span></div></li> -<li><div class="src-line"><a name="a3662"></a></span><span class="src-str"> * surrounding it to make it look nice.</span></div></li> -<li><div class="src-line"><a name="a3663"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a3664"></a></span><span class="src-str"> * @param string The code already parsed (reference!)</span></div></li> -<li><div class="src-line"><a name="a3665"></a></span><span class="src-str"> * @since 1.0.0</span></div></li> -<li><div class="src-line"><a name="a3666"></a></span><span class="src-str"> * @access private</span></div></li> -<li><div class="src-line"><a name="a3667"></a></span><span class="src-str"> */</span></div></li> -<li><div class="src-line"><a name="a3668"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">finalise</span><span class="src-sym">(</span><span class="src-sym">&</span><span class="src-var">$parsed_code</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3669"></a></span><span class="src-str"> <span class="src-comm">// Remove end parts of important declarations</span></span></div></li> -<li><div class="src-line"><a name="a3670"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// This is BUGGY!! My fault for bad code: fix coming in 1.2</span></span></div></li> -<li><div class="src-line"><a name="a3671"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// @todo Remove this crap</span></span></div></li> -<li><div class="src-line"><a name="a3672"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodenable_important_blocks">enable_important_blocks</a> &&</span></div></li> -<li><div class="src-line"><a name="a3673"></a></span><span class="src-str"> <span class="src-sym">(</span><a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$parsed_code</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_START_IMPORTANT">GESHI_START_IMPORTANT</a></span><span class="src-sym">))</span> === <span class="src-id">false</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3674"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_END_IMPORTANT">GESHI_END_IMPORTANT</a></span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-str">''</span><span class="src-sym">,</span> <span class="src-var">$parsed_code</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3675"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3676"></a> </div></li> -<li><div class="src-line"><a name="a3677"></a></span><span class="src-str"> <span class="src-comm">// Add HTML whitespace stuff if we're using the <div> header</span></span></div></li> -<li><div class="src-line"><a name="a3678"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE">GESHI_HEADER_PRE</a></span> && <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_VALID">GESHI_HEADER_PRE_VALID</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3679"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">indent</span><span class="src-sym">(</span><span class="src-var">$parsed_code</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3680"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3681"></a> </div></li> -<li><div class="src-line"><a name="a3682"></a></span><span class="src-str"> <span class="src-comm">// purge some unnecessary stuff</span></span></div></li> -<li><div class="src-line"><a name="a3683"></a></span><span class="src-str"><span class="src-comm"></span> /** NOTE: memorypeak #1 */</span></div></li> -<li><div class="src-line"><a name="a3684"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> = <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'#<span[^>]+>(\s*)</span>#'</span><span class="src-sym">,</span> <span class="src-str">'\\1'</span><span class="src-sym">,</span> <span class="src-var">$parsed_code</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3685"></a> </div></li> -<li><div class="src-line"><a name="a3686"></a></span><span class="src-str"> <span class="src-comm">// If we are using IDs for line numbers, there needs to be an overall</span></span></div></li> -<li><div class="src-line"><a name="a3687"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// ID set to prevent collisions.</span></span></div></li> -<li><div class="src-line"><a name="a3688"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">add_ids</span> && <span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_id</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3689"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_id</span> = <span class="src-str">'geshi-'</span> . <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><a href="http://www.php.net/md5">md5</a><span class="src-sym">(</span><a href="http://www.php.net/microtime">microtime</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">,</span> <span class="src-num">0</span><span class="src-sym">,</span> <span class="src-num">4</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3690"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3691"></a> </div></li> -<li><div class="src-line"><a name="a3692"></a></span><span class="src-str"> <span class="src-comm">// Get code into lines</span></span></div></li> -<li><div class="src-line"><a name="a3693"></a></span><span class="src-str"><span class="src-comm"></span> /** NOTE: memorypeak #2 */</span></div></li> -<li><div class="src-line"><a name="a3694"></a></span><span class="src-str"> <span class="src-var">$code</span> = <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-var">$parsed_code</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3695"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> = <span class="src-var">$this</span><span class="src-sym">-></span><a href="http://www.php.net/header">header</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3696"></a> </div></li> -<li><div class="src-line"><a name="a3697"></a></span><span class="src-str"> <span class="src-comm">// If we're using line numbers, we insert <li>s and appropriate</span></span></div></li> -<li><div class="src-line"><a name="a3698"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// markup to style them (otherwise we don't need to do anything)</span></span></div></li> -<li><div class="src-line"><a name="a3699"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a></span> && <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_TABLE">GESHI_HEADER_PRE_TABLE</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3700"></a></span><span class="src-str"> <span class="src-comm">// If we're using the <pre> header, we shouldn't add newlines because</span></span></div></li> -<li><div class="src-line"><a name="a3701"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// the <pre> will line-break them (and the <li>s already do this for us)</span></span></div></li> -<li><div class="src-line"><a name="a3702"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$ls</span> = <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE">GESHI_HEADER_PRE</a></span> && <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_VALID">GESHI_HEADER_PRE_VALID</a></span><span class="src-sym">)</span> ? <span class="src-str">"\n"</span> : <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3703"></a> </div></li> -<li><div class="src-line"><a name="a3704"></a></span><span class="src-str"> <span class="src-comm">// Set vars to defaults for following loop</span></span></div></li> -<li><div class="src-line"><a name="a3705"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$i</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3706"></a> </div></li> -<li><div class="src-line"><a name="a3707"></a></span><span class="src-str"> <span class="src-comm">// Foreach line...</span></span></div></li> -<li><div class="src-line"><a name="a3708"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">for</span> <span class="src-sym">(</span><span class="src-var">$i</span> = <span class="src-num">0</span><span class="src-sym">,</span> <span class="src-var">$n</span> = <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span><span class="src-sym">;</span> <span class="src-var">$i</span> < <span class="src-var">$n</span><span class="src-sym">;</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3709"></a></span><span class="src-str"> <span class="src-comm">//Reset the attributes for a new line ...</span></span></div></li> -<li><div class="src-line"><a name="a3710"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$attrs</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3711"></a> </div></li> -<li><div class="src-line"><a name="a3712"></a></span><span class="src-str"> <span class="src-comm">// Make lines have at least one space in them if they're empty</span></span></div></li> -<li><div class="src-line"><a name="a3713"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// BenBE: Checking emptiness using trim instead of relying on blanks</span></span></div></li> -<li><div class="src-line"><a name="a3714"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-str">''</span> == <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3715"></a></span><span class="src-str"> <span class="src-var">$code</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span> = <span class="src-str">'&nbsp;'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3716"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3717"></a> </div></li> -<li><div class="src-line"><a name="a3718"></a></span><span class="src-str"> <span class="src-comm">// If this is a "special line"...</span></span></div></li> -<li><div class="src-line"><a name="a3719"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_FANCY_LINE_NUMBERS">GESHI_FANCY_LINE_NUMBERS</a></span> &&</span></div></li> -<li><div class="src-line"><a name="a3720"></a></span><span class="src-str"> <span class="src-var">$i</span> % <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_nth_row</span> == <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_nth_row</span> - <span class="src-num">1</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3721"></a></span><span class="src-str"> <span class="src-comm">// Set the attributes to style the line</span></span></div></li> -<li><div class="src-line"><a name="a3722"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3723"></a></span><span class="src-str"> <span class="src-comm">//$attr = ' class="li2"';</span></span></div></li> -<li><div class="src-line"><a name="a3724"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$attrs</span><span class="src-sym">[</span><span class="src-str">'class'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'li2'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3725"></a></span><span class="src-str"> <span class="src-var">$def_attr</span> = <span class="src-str">' class="de2"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3726"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3727"></a></span><span class="src-str"> <span class="src-comm">//$attr = ' style="' . $this->line_style2 . '"';</span></span></div></li> -<li><div class="src-line"><a name="a3728"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$attrs</span><span class="src-sym">[</span><span class="src-str">'style'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_style2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3729"></a></span><span class="src-str"> <span class="src-comm">// This style "covers up" the special styles set for special lines</span></span></div></li> -<li><div class="src-line"><a name="a3730"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// so that styles applied to special lines don't apply to the actual</span></span></div></li> -<li><div class="src-line"><a name="a3731"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// code on that line</span></span></div></li> -<li><div class="src-line"><a name="a3732"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$def_attr</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">code_style</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3733"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3734"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3735"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3736"></a></span><span class="src-str"> <span class="src-comm">//$attr = ' class="li1"';</span></span></div></li> -<li><div class="src-line"><a name="a3737"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$attrs</span><span class="src-sym">[</span><span class="src-str">'class'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'li1'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3738"></a></span><span class="src-str"> <span class="src-var">$def_attr</span> = <span class="src-str">' class="de1"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3739"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3740"></a></span><span class="src-str"> <span class="src-comm">//$attr = ' style="' . $this->line_style1 . '"';</span></span></div></li> -<li><div class="src-line"><a name="a3741"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$attrs</span><span class="src-sym">[</span><span class="src-str">'style'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_style1</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3742"></a></span><span class="src-str"> <span class="src-var">$def_attr</span> = <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">code_style</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3743"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3744"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3745"></a> </div></li> -<li><div class="src-line"><a name="a3746"></a></span><span class="src-str"> <span class="src-comm">//Check which type of tag to insert for this line</span></span></div></li> -<li><div class="src-line"><a name="a3747"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_VALID">GESHI_HEADER_PRE_VALID</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3748"></a></span><span class="src-str"> <span class="src-var">$start</span> = <span class="src-str">"</span></span><pre<span class="src-var">$def_attr</span>><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3749"></a></span><span class="src-str"> <span class="src-var">$end</span> = <span class="src-str">'</pre>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3750"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3751"></a></span><span class="src-str"> <span class="src-comm">// Span or div?</span></span></div></li> -<li><div class="src-line"><a name="a3752"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$start</span> = <span class="src-str">"</span></span><div<span class="src-var">$def_attr</span>><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3753"></a></span><span class="src-str"> <span class="src-var">$end</span> = <span class="src-str">'</div>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3754"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3755"></a> </div></li> -<li><div class="src-line"><a name="a3756"></a></span><span class="src-str"> ++<span class="src-var">$i</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3757"></a> </div></li> -<li><div class="src-line"><a name="a3758"></a></span><span class="src-str"> <span class="src-comm">// Are we supposed to use ids? If so, add them</span></span></div></li> -<li><div class="src-line"><a name="a3759"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">add_ids</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3760"></a></span><span class="src-str"> <span class="src-var">$attrs</span><span class="src-sym">[</span><span class="src-str">'id'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">"</span></span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_id</span>-<span class="src-var">$i</span><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3761"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3762"></a> </div></li> -<li><div class="src-line"><a name="a3763"></a></span><span class="src-str"> <span class="src-comm">//Is this some line with extra styles???</span></span></div></li> -<li><div class="src-line"><a name="a3764"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-id">in_array</span><span class="src-sym">(</span><span class="src-var">$i</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3765"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3766"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines_styles</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3767"></a></span><span class="src-str"> <span class="src-var">$attrs</span><span class="src-sym">[</span><span class="src-str">'class'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">"</span></span>lx<span class="src-var">$i</span><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3768"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3769"></a></span><span class="src-str"> <span class="src-var">$attrs</span><span class="src-sym">[</span><span class="src-str">'class'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">"ln-xtra"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3770"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3771"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3772"></a></span><span class="src-str"> <a href="http://www.php.net/array_push">array_push</a><span class="src-sym">(</span><span class="src-var">$attrs</span><span class="src-sym">[</span><span class="src-str">'style'</span><span class="src-sym">]</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">get_line_style</span><span class="src-sym">(</span><span class="src-var">$i</span><span class="src-sym">))</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3773"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3774"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3775"></a> </div></li> -<li><div class="src-line"><a name="a3776"></a></span><span class="src-str"> <span class="src-comm">// Add in the line surrounded by appropriate list HTML</span></span></div></li> -<li><div class="src-line"><a name="a3777"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$attr_string</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3778"></a></span><span class="src-str"> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$attrs</span> <span class="src-key">as</span> <span class="src-var">$key</span> => <span class="src-var">$attr</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3779"></a></span><span class="src-str"> <span class="src-var">$attr_string</span> .= <span class="src-str">' '</span> . <span class="src-var">$key</span> . <span class="src-str">'="'</span> . <a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">' '</span><span class="src-sym">,</span> <span class="src-var">$attr</span><span class="src-sym">)</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3780"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3781"></a> </div></li> -<li><div class="src-line"><a name="a3782"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">"</span></span><li<span class="src-var">$attr_string</span>><span class="src-var">$start</span>{<span class="src-var">$code</span><span class="src-sym">[</span><span class="src-var">$i</span>-<span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">}</span><span class="src-var">$end</span></li><span class="src-var">$ls</span><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3783"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">[</span><span class="src-var">$i</span> - <span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3784"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3785"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3786"></a></span><span class="src-str"> <span class="src-var">$n</span> = <span class="src-id">count</span><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3787"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3788"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' class="de1"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3789"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3790"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' style="'</span>. <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">code_style</span> .<span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3791"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3792"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_VALID">GESHI_HEADER_PRE_VALID</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3793"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">'<pre'</span>. <span class="src-var">$attributes</span> .<span class="src-str">'>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3794"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">elseif</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_TABLE">GESHI_HEADER_PRE_TABLE</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3795"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3796"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3797"></a></span><span class="src-str"> <span class="src-var">$attrs</span> = <span class="src-str">' class="ln"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3798"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3799"></a></span><span class="src-str"> <span class="src-var">$attrs</span> = <span class="src-str">' style="'</span>. <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">table_linenumber_style</span> .<span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3800"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3801"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">'<td'</span>.<span class="src-var">$attrs</span>.<span class="src-str">'><pre'</span>.<span class="src-var">$attributes</span>.<span class="src-str">'>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3802"></a></span><span class="src-str"> <span class="src-comm">// get linenumbers</span></span></div></li> -<li><div class="src-line"><a name="a3803"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// we don't merge it with the for below, since it should be better for</span></span></div></li> -<li><div class="src-line"><a name="a3804"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// memory consumption this way</span></span></div></li> -<li><div class="src-line"><a name="a3805"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// @todo: but... actually it would still be somewhat nice to merge the two loops</span></span></div></li> -<li><div class="src-line"><a name="a3806"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// the mem peaks are at different positions</span></span></div></li> -<li><div class="src-line"><a name="a3807"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">for</span> <span class="src-sym">(</span><span class="src-var">$i</span> = <span class="src-num">0</span><span class="src-sym">;</span> <span class="src-var">$i</span> < <span class="src-var">$n</span><span class="src-sym">;</span> ++<span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3808"></a></span><span class="src-str"> <span class="src-var">$close</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3809"></a></span><span class="src-str"> <span class="src-comm">// fancy lines</span></span></div></li> -<li><div class="src-line"><a name="a3810"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_FANCY_LINE_NUMBERS">GESHI_FANCY_LINE_NUMBERS</a></span> &&</span></div></li> -<li><div class="src-line"><a name="a3811"></a></span><span class="src-str"> <span class="src-var">$i</span> % <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_nth_row</span> == <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_nth_row</span> - <span class="src-num">1</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3812"></a></span><span class="src-str"> <span class="src-comm">// Set the attributes to style the line</span></span></div></li> -<li><div class="src-line"><a name="a3813"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3814"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">'<span class="xtra li2"><span class="de2">'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3815"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3816"></a></span><span class="src-str"> <span class="src-comm">// This style "covers up" the special styles set for special lines</span></span></div></li> -<li><div class="src-line"><a name="a3817"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// so that styles applied to special lines don't apply to the actual</span></span></div></li> -<li><div class="src-line"><a name="a3818"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// code on that line</span></span></div></li> -<li><div class="src-line"><a name="a3819"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$parsed_code</span> .= <span class="src-str">'<span style="display:block;'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_style2</span> . <span class="src-str">'">'</span></span></div></li> -<li><div class="src-line"><a name="a3820"></a></span><span class="src-str"> .<span class="src-str">'<span style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">code_style</span> .<span class="src-str">'">'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3821"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3822"></a></span><span class="src-str"> <span class="src-var">$close</span> += <span class="src-num">2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3823"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3824"></a></span><span class="src-str"> <span class="src-comm">//Is this some line with extra styles???</span></span></div></li> -<li><div class="src-line"><a name="a3825"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/in_array">in_array</a><span class="src-sym">(</span><span class="src-var">$i</span> + <span class="src-num">1</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3826"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3827"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines_styles</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3828"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">"</span></span><span class=\"xtra lx<span class="src-var">$i</span>\"><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3829"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3830"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">"<span class=\"xtra ln-xtra\">"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3831"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3832"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3833"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">"<span style=\"display:block;"</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">get_line_style</span><span class="src-sym">(</span><span class="src-var">$i</span><span class="src-sym">)</span> . <span class="src-str">"\">"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3834"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3835"></a></span><span class="src-str"> ++<span class="src-var">$close</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3836"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3837"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers_start</span> + <span class="src-var">$i</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3838"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$close</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3839"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <a href="http://www.php.net/str_repeat">str_repeat</a><span class="src-sym">(</span><span class="src-str">'</span>'</span><span class="src-sym">,</span> <span class="src-var">$close</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3840"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$i</span> != <span class="src-var">$n</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3841"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">"\n"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3842"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3843"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3844"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">'</pre></td><td'</span>.<span class="src-var">$attributes</span>.<span class="src-str">'>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3845"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3846"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">'<pre'</span>. <span class="src-var">$attributes</span> .<span class="src-str">'>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3847"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3848"></a></span><span class="src-str"> <span class="src-comm">// No line numbers, but still need to handle highlighting lines extra.</span></span></div></li> -<li><div class="src-line"><a name="a3849"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// Have to use divs so the full width of the code is highlighted</span></span></div></li> -<li><div class="src-line"><a name="a3850"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$close</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3851"></a></span><span class="src-str"> <span class="src-key">for</span> <span class="src-sym">(</span><span class="src-var">$i</span> = <span class="src-num">0</span><span class="src-sym">;</span> <span class="src-var">$i</span> < <span class="src-var">$n</span><span class="src-sym">;</span> ++<span class="src-var">$i</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3852"></a></span><span class="src-str"> <span class="src-comm">// Make lines have at least one space in them if they're empty</span></span></div></li> -<li><div class="src-line"><a name="a3853"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// BenBE: Checking emptiness using trim instead of relying on blanks</span></span></div></li> -<li><div class="src-line"><a name="a3854"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-str">''</span> == <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3855"></a></span><span class="src-str"> <span class="src-var">$code</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span> = <span class="src-str">'&nbsp;'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3856"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3857"></a></span><span class="src-str"> <span class="src-comm">// fancy lines</span></span></div></li> -<li><div class="src-line"><a name="a3858"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_FANCY_LINE_NUMBERS">GESHI_FANCY_LINE_NUMBERS</a></span> &&</span></div></li> -<li><div class="src-line"><a name="a3859"></a></span><span class="src-str"> <span class="src-var">$i</span> % <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_nth_row</span> == <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_nth_row</span> - <span class="src-num">1</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3860"></a></span><span class="src-str"> <span class="src-comm">// Set the attributes to style the line</span></span></div></li> -<li><div class="src-line"><a name="a3861"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3862"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">'<span class="xtra li2"><span class="de2">'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3863"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3864"></a></span><span class="src-str"> <span class="src-comm">// This style "covers up" the special styles set for special lines</span></span></div></li> -<li><div class="src-line"><a name="a3865"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// so that styles applied to special lines don't apply to the actual</span></span></div></li> -<li><div class="src-line"><a name="a3866"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// code on that line</span></span></div></li> -<li><div class="src-line"><a name="a3867"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$parsed_code</span> .= <span class="src-str">'<span style="display:block;'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_style2</span> . <span class="src-str">'">'</span></span></div></li> -<li><div class="src-line"><a name="a3868"></a></span><span class="src-str"> .<span class="src-str">'<span style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">code_style</span> .<span class="src-str">'">'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3869"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3870"></a></span><span class="src-str"> <span class="src-var">$close</span> += <span class="src-num">2</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3871"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3872"></a></span><span class="src-str"> <span class="src-comm">//Is this some line with extra styles???</span></span></div></li> -<li><div class="src-line"><a name="a3873"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><a href="http://www.php.net/in_array">in_array</a><span class="src-sym">(</span><span class="src-var">$i</span> + <span class="src-num">1</span><span class="src-sym">,</span> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3874"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3875"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines_styles</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3876"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">"</span></span><span class=\"xtra lx<span class="src-var">$i</span>\"><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3877"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3878"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">"<span class=\"xtra ln-xtra\">"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3879"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3880"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3881"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">"<span style=\"display:block;"</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">get_line_style</span><span class="src-sym">(</span><span class="src-var">$i</span><span class="src-sym">)</span> . <span class="src-str">"\">"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3882"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3883"></a></span><span class="src-str"> ++<span class="src-var">$close</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3884"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3885"></a> </div></li> -<li><div class="src-line"><a name="a3886"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-var">$code</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3887"></a> </div></li> -<li><div class="src-line"><a name="a3888"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$close</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3889"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <a href="http://www.php.net/str_repeat">str_repeat</a><span class="src-sym">(</span><span class="src-str">'</span>'</span><span class="src-sym">,</span> <span class="src-var">$close</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3890"></a></span><span class="src-str"> <span class="src-var">$close</span> = <span class="src-num">0</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3891"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3892"></a></span><span class="src-str"> <span class="src-key">elseif</span> <span class="src-sym">(</span><span class="src-var">$i</span> + <span class="src-num">1</span> < <span class="src-var">$n</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3893"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">"\n"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3894"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3895"></a></span><span class="src-str"> unset<span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3896"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3897"></a> </div></li> -<li><div class="src-line"><a name="a3898"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_VALID">GESHI_HEADER_PRE_VALID</a></span> || <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_TABLE">GESHI_HEADER_PRE_TABLE</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3899"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">'</pre>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3900"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3901"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_TABLE">GESHI_HEADER_PRE_TABLE</a></span> && <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3902"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-str">'</td>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3903"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3904"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3905"></a> </div></li> -<li><div class="src-line"><a name="a3906"></a></span><span class="src-str"> <span class="src-var">$parsed_code</span> .= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">footer</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3907"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3908"></a> </div></li> -<li><div class="src-line"><a name="a3909"></a></span><span class="src-str"> /**</span></div></li> -<li><div class="src-line"><a name="a3910"></a></span><span class="src-str"> * Creates the header for the code block (with correct attributes)</span></div></li> -<li><div class="src-line"><a name="a3911"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a3912"></a></span><span class="src-str"> * @return string The header for the code block</span></div></li> -<li><div class="src-line"><a name="a3913"></a></span><span class="src-str"> * @since 1.0.0</span></div></li> -<li><div class="src-line"><a name="a3914"></a></span><span class="src-str"> * @access private</span></div></li> -<li><div class="src-line"><a name="a3915"></a></span><span class="src-str"> */</span></div></li> -<li><div class="src-line"><a name="a3916"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="http://www.php.net/header">header</a><span class="src-sym">(</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3917"></a></span><span class="src-str"> <span class="src-comm">// Get attributes needed</span></span></div></li> -<li><div class="src-line"><a name="a3918"></a></span><span class="src-str"><span class="src-comm"></span> /**</span></div></li> -<li><div class="src-line"><a name="a3919"></a></span><span class="src-str"> * @todo Document behaviour change - class is outputted regardless of whether</span></div></li> -<li><div class="src-line"><a name="a3920"></a></span><span class="src-str"> * we're using classes or not. Same with style</span></div></li> -<li><div class="src-line"><a name="a3921"></a></span><span class="src-str"> */</span></div></li> -<li><div class="src-line"><a name="a3922"></a></span><span class="src-str"> <span class="src-var">$attributes</span> = <span class="src-str">' class="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3923"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_class</span> != <span class="src-str">''</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3924"></a></span><span class="src-str"> <span class="src-var">$attributes</span> .= <span class="src-str">" "</span>.<span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_class</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3925"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3926"></a></span><span class="src-str"> <span class="src-var">$attributes</span> .= <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3927"></a> </div></li> -<li><div class="src-line"><a name="a3928"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_id</span> != <span class="src-str">''</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3929"></a></span><span class="src-str"> <span class="src-var">$attributes</span> .= <span class="src-str">"</span></span> id=\"{<span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_id</span><span class="src-sym">}</span>\"<span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3930"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3931"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_style</span> != <span class="src-str">''</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3932"></a></span><span class="src-str"> <span class="src-var">$attributes</span> .= <span class="src-str">' style="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_style</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3933"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3934"></a> </div></li> -<li><div class="src-line"><a name="a3935"></a></span><span class="src-str"> <span class="src-var">$ol_attributes</span> = <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3936"></a> </div></li> -<li><div class="src-line"><a name="a3937"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers_start</span> != <span class="src-num">1</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3938"></a></span><span class="src-str"> <span class="src-var">$ol_attributes</span> .= <span class="src-str">' start="'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers_start</span> . <span class="src-str">'"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3939"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3940"></a> </div></li> -<li><div class="src-line"><a name="a3941"></a></span><span class="src-str"> <span class="src-comm">// Get the header HTML</span></span></div></li> -<li><div class="src-line"><a name="a3942"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$header</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_content</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3943"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3944"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE">GESHI_HEADER_PRE</a></span> || <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_VALID">GESHI_HEADER_PRE_VALID</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3945"></a></span><span class="src-str"> <span class="src-var">$header</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-str">''</span><span class="src-sym">,</span> <span class="src-var">$header</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3946"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3947"></a></span><span class="src-str"> <span class="src-var">$header</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">replace_keywords</span><span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3948"></a> </div></li> -<li><div class="src-line"><a name="a3949"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3950"></a></span><span class="src-str"> <span class="src-var">$attr</span> = <span class="src-str">' class="head"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3951"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3952"></a></span><span class="src-str"> <span class="src-var">$attr</span> = <span class="src-str">"</span></span> style=\"{<span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_content_style</span><span class="src-sym">}</span>\"<span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3953"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3954"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id">GESHI_HEADER_PRE_TABLE</span> && <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id">GESHI_NO_LINE_NUMBERS</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3955"></a></span><span class="src-str"> <span class="src-var">$header</span> = </span><span class="src-str">"</span><thead><tr><td colspan=\"2\" <span class="src-var">$attr</span>><span class="src-var">$header</span></td></tr></thead><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3956"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3957"></a></span><span class="src-str"> <span class="src-var">$header</span> = </span><span class="src-str">"</span><div<span class="src-var">$attr</span>><span class="src-var">$header</span></div><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3958"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3959"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3960"></a> </div></li> -<li><div class="src-line"><a name="a3961"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-id">GESHI_HEADER_NONE</span> == <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3962"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id">GESHI_NO_LINE_NUMBERS</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3963"></a></span><span class="src-str"> <span class="src-key">return</span> </span><span class="src-str">"</span><span class="src-var">$header</span><ol<span class="src-var">$attributes$ol_attributes</span>><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3964"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3965"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-var">$header</span> . <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">force_code_block</span> ? <span class="src-str">'<div>'</span> : <span class="src-str">''</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3966"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3967"></a> </div></li> -<li><div class="src-line"><a name="a3968"></a></span><span class="src-str"> <span class="src-comm">// Work out what to return and do it</span></span></div></li> -<li><div class="src-line"><a name="a3969"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3970"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE">GESHI_HEADER_PRE</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3971"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-str">"</span></span><pre<span class="src-var">$attributes</span>><span class="src-var">$header</span><ol<span class="src-var">$ol_attributes</span>><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3972"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id">GESHI_HEADER_DIV</span> ||</span></div></li> -<li><div class="src-line"><a name="a3973"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id">GESHI_HEADER_PRE_VALID</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3974"></a></span><span class="src-str"> <span class="src-key">return</span> </span><span class="src-str">"</span><div<span class="src-var">$attributes</span>><span class="src-var">$header</span><ol<span class="src-var">$ol_attributes</span>><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3975"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id">GESHI_HEADER_PRE_TABLE</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3976"></a></span><span class="src-str"> <span class="src-key">return</span> </span><span class="src-str">"</span><table<span class="src-var">$attributes</span>><span class="src-var">$header</span><tbody><tr class=\"li1\"><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3977"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3978"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3979"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id">GESHI_HEADER_PRE</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3980"></a></span><span class="src-str"> <span class="src-key">return</span> </span><span class="src-str">"</span><pre<span class="src-var">$attributes</span>><span class="src-var">$header</span><span class="src-str">" </span><span class="src-str">.</span></div></li> -<li><div class="src-line"><a name="a3981"></a></span><span class="src-str"> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">force_code_block</span> ? <span class="src-str">'<div>'</span> : <span class="src-str">''</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3982"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3983"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-str">"</span></span><div<span class="src-var">$attributes</span>><span class="src-var">$header</span><span class="src-str">" </span><span class="src-str">.</span></div></li> -<li><div class="src-line"><a name="a3984"></a></span><span class="src-str"> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">force_code_block</span> ? <span class="src-str">'<div>'</span> : <span class="src-str">''</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3985"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3986"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3987"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a3988"></a> </div></li> -<li><div class="src-line"><a name="a3989"></a></span><span class="src-str"> /**</span></div></li> -<li><div class="src-line"><a name="a3990"></a></span><span class="src-str"> * Returns the footer for the code block.</span></div></li> -<li><div class="src-line"><a name="a3991"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a3992"></a></span><span class="src-str"> * @return string The footer for the code block</span></div></li> -<li><div class="src-line"><a name="a3993"></a></span><span class="src-str"> * @since 1.0.0</span></div></li> -<li><div class="src-line"><a name="a3994"></a></span><span class="src-str"> * @access private</span></div></li> -<li><div class="src-line"><a name="a3995"></a></span><span class="src-str"> */</span></div></li> -<li><div class="src-line"><a name="a3996"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">footer</span><span class="src-sym">(</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3997"></a></span><span class="src-str"> <span class="src-var">$footer</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">footer_content</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a3998"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$footer</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a3999"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE">GESHI_HEADER_PRE</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4000"></a></span><span class="src-str"> <span class="src-var">$footer</span> = <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">"\n"</span><span class="src-sym">,</span> <span class="src-str">''</span><span class="src-sym">,</span> <span class="src-var">$footer</span><span class="src-sym">)</span><span class="src-sym">;;</span></span></div></li> -<li><div class="src-line"><a name="a4001"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4002"></a></span><span class="src-str"> <span class="src-var">$footer</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">replace_keywords</span><span class="src-sym">(</span><span class="src-var">$footer</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4003"></a> </div></li> -<li><div class="src-line"><a name="a4004"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">use_classes</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4005"></a></span><span class="src-str"> <span class="src-var">$attr</span> = <span class="src-str">' class="foot"'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4006"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4007"></a></span><span class="src-str"> <span class="src-var">$attr</span> = <span class="src-str">"</span></span> style=\"{<span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">footer_content_style</span><span class="src-sym">}</span>\"<span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4008"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4009"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id">GESHI_HEADER_PRE_TABLE</span> && <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">linenumbers</span> != <span class="src-id">GESHI_NO_LINE_NUMBERS</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4010"></a></span><span class="src-str"> <span class="src-var">$footer</span> = </span><span class="src-str">"</span><tfoot><tr><td colspan=\"2\"><span class="src-var">$footer</span></td></tr></tfoot><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4011"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4012"></a></span><span class="src-str"> <span class="src-var">$footer</span> = </span><span class="src-str">"</span><div<span class="src-var">$attr</span>><span class="src-var">$footer</span></div><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4013"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4014"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4015"></a> </div></li> -<li><div class="src-line"><a name="a4016"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-id">GESHI_HEADER_NONE</span> == <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4017"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id">GESHI_NO_LINE_NUMBERS</span><span class="src-sym">)</span> ? <span class="src-str">'</ol>'</span> . <span class="src-var">$footer</span> : <span class="src-var">$footer</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4018"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4019"></a> </div></li> -<li><div class="src-line"><a name="a4020"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_DIV">GESHI_HEADER_DIV</a></span> || <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_VALID">GESHI_HEADER_PRE_VALID</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4021"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4022"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-str">"</span></span></ol><span class="src-var">$footer</span></div><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4023"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4024"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">force_code_block</span> ? <span class="src-str">'</div>'</span> : <span class="src-str">''</span><span class="src-sym">)</span> .</span></div></li> -<li><div class="src-line"><a name="a4025"></a></span><span class="src-str"> <span class="src-str">"</span></span><span class="src-var">$footer</span></div><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4026"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4027"></a></span><span class="src-str"> <span class="src-key">elseif</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_type</span> == <span class="src-id">GESHI_HEADER_PRE_TABLE</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4028"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id">GESHI_NO_LINE_NUMBERS</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4029"></a></span><span class="src-str"> <span class="src-key">return</span> </span><span class="src-str">"</span></tr></tbody><span class="src-var">$footer</span></table><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4030"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4031"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">force_code_block</span> ? <span class="src-str">'</div>'</span> : <span class="src-str">''</span><span class="src-sym">)</span> .</span></div></li> -<li><div class="src-line"><a name="a4032"></a></span><span class="src-str"> <span class="src-str">"</span></span><span class="src-var">$footer</span></div><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4033"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4034"></a></span><span class="src-str"> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4035"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id">GESHI_NO_LINE_NUMBERS</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4036"></a></span><span class="src-str"> <span class="src-key">return</span> </span><span class="src-str">"</span></ol><span class="src-var">$footer</span></pre><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4037"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4038"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">force_code_block</span> ? <span class="src-str">'</div>'</span> : <span class="src-str">''</span><span class="src-sym">)</span> .</span></div></li> -<li><div class="src-line"><a name="a4039"></a></span><span class="src-str"> <span class="src-str">"</span></span><span class="src-var">$footer</span></pre><span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4040"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4041"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4042"></a> </div></li> -<li><div class="src-line"><a name="a4043"></a></span><span class="src-str"> /**</span></div></li> -<li><div class="src-line"><a name="a4044"></a></span><span class="src-str"> * Replaces certain keywords in the header and footer with</span></div></li> -<li><div class="src-line"><a name="a4045"></a></span><span class="src-str"> * certain configuration values</span></div></li> -<li><div class="src-line"><a name="a4046"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a4047"></a></span><span class="src-str"> * @param string The header or footer content to do replacement on</span></div></li> -<li><div class="src-line"><a name="a4048"></a></span><span class="src-str"> * @return string The header or footer with replaced keywords</span></div></li> -<li><div class="src-line"><a name="a4049"></a></span><span class="src-str"> * @since 1.0.2</span></div></li> -<li><div class="src-line"><a name="a4050"></a></span><span class="src-str"> * @access private</span></div></li> -<li><div class="src-line"><a name="a4051"></a></span><span class="src-str"> */</span></div></li> -<li><div class="src-line"><a name="a4052"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">replace_keywords</span><span class="src-sym">(</span><span class="src-var">$instr</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4053"></a></span><span class="src-str"> <span class="src-var">$keywords</span> = <span class="src-var">$replacements</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4054"></a> </div></li> -<li><div class="src-line"><a name="a4055"></a></span><span class="src-str"> <span class="src-var">$keywords</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'<TIME>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4056"></a></span><span class="src-str"> <span class="src-var">$keywords</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'{TIME}'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4057"></a></span><span class="src-str"> <span class="src-var">$replacements</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-var">$replacements</span><span class="src-sym">[</span><span class="src-sym">]</span> = <a href="http://www.php.net/number_format">number_format</a><span class="src-sym">(</span><span class="src-var">$time</span> = <span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodget_time">get_time</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4058"></a> </div></li> -<li><div class="src-line"><a name="a4059"></a></span><span class="src-str"> <span class="src-var">$keywords</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'<LANGUAGE>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4060"></a></span><span class="src-str"> <span class="src-var">$keywords</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'{LANGUAGE}'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4061"></a></span><span class="src-str"> <span class="src-var">$replacements</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-var">$replacements</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'LANG_NAME'</span><span class="src-sym">]</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4062"></a> </div></li> -<li><div class="src-line"><a name="a4063"></a></span><span class="src-str"> <span class="src-var">$keywords</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'<VERSION>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4064"></a></span><span class="src-str"> <span class="src-var">$keywords</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'{VERSION}'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4065"></a></span><span class="src-str"> <span class="src-var">$replacements</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-var">$replacements</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_VERSION">GESHI_VERSION</a></span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4066"></a> </div></li> -<li><div class="src-line"><a name="a4067"></a></span><span class="src-str"> <span class="src-var">$keywords</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'<SPEED>'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4068"></a></span><span class="src-str"> <span class="src-var">$keywords</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-str">'{SPEED}'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4069"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$time</span> <= <span class="src-num">0</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4070"></a></span><span class="src-str"> <span class="src-var">$speed</span> = <span class="src-str">'N/A'</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4071"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4072"></a></span><span class="src-str"> <span class="src-var">$speed</span> = <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">source</span><span class="src-sym">)</span> / <span class="src-var">$time</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4073"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$speed</span> >= <span class="src-num">1024</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4074"></a></span><span class="src-str"> <span class="src-var">$speed</span> = <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">"%.2f KB/s"</span><span class="src-sym">,</span> <span class="src-var">$speed</span> / <span class="src-num">1024.0</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4075"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4076"></a></span><span class="src-str"> <span class="src-var">$speed</span> = <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">"%.0f B/s"</span><span class="src-sym">,</span> <span class="src-var">$speed</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4077"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4078"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4079"></a></span><span class="src-str"> <span class="src-var">$replacements</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-var">$replacements</span><span class="src-sym">[</span><span class="src-sym">]</span> = <span class="src-var">$speed</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4080"></a> </div></li> -<li><div class="src-line"><a name="a4081"></a></span><span class="src-str"> <span class="src-key">return</span> <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-var">$keywords</span><span class="src-sym">,</span> <span class="src-var">$replacements</span><span class="src-sym">,</span> <span class="src-var">$instr</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4082"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4083"></a> </div></li> -<li><div class="src-line"><a name="a4084"></a></span><span class="src-str"> /**</span></div></li> -<li><div class="src-line"><a name="a4085"></a></span><span class="src-str"> * Secure replacement for PHP built-in function htmlspecialchars().</span></div></li> -<li><div class="src-line"><a name="a4086"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a4087"></a></span><span class="src-str"> * See ticket #427 (http://wush.net/trac/wikka/ticket/427) for the rationale</span></div></li> -<li><div class="src-line"><a name="a4088"></a></span><span class="src-str"> * for this replacement function.</span></div></li> -<li><div class="src-line"><a name="a4089"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a4090"></a></span><span class="src-str"> * The INTERFACE for this function is almost the same as that for</span></div></li> -<li><div class="src-line"><a name="a4091"></a></span><span class="src-str"> * htmlspecialchars(), with the same default for quote style; however, there</span></div></li> -<li><div class="src-line"><a name="a4092"></a></span><span class="src-str"> * is no 'charset' parameter. The reason for this is as follows:</span></div></li> -<li><div class="src-line"><a name="a4093"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a4094"></a></span><span class="src-str"> * The PHP docs say:</span></div></li> -<li><div class="src-line"><a name="a4095"></a></span><span class="src-str"> * "The third argument charset defines character set used in conversion."</span></div></li> -<li><div class="src-line"><a name="a4096"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a4097"></a></span><span class="src-str"> * I suspect PHP's htmlspecialchars() is working at the byte-value level and</span></div></li> -<li><div class="src-line"><a name="a4098"></a></span><span class="src-str"> * thus _needs_ to know (or asssume) a character set because the special</span></div></li> -<li><div class="src-line"><a name="a4099"></a></span><span class="src-str"> * characters to be replaced could exist at different code points in</span></div></li> -<li><div class="src-line"><a name="a4100"></a></span><span class="src-str"> * different character sets. (If indeed htmlspecialchars() works at</span></div></li> -<li><div class="src-line"><a name="a4101"></a></span><span class="src-str"> * byte-value level that goes some way towards explaining why the</span></div></li> -<li><div class="src-line"><a name="a4102"></a></span><span class="src-str"> * vulnerability would exist in this function, too, and not only in</span></div></li> -<li><div class="src-line"><a name="a4103"></a></span><span class="src-str"> * htmlentities() which certainly is working at byte-value level.)</span></div></li> -<li><div class="src-line"><a name="a4104"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a4105"></a></span><span class="src-str"> * This replacement function however works at character level and should</span></div></li> -<li><div class="src-line"><a name="a4106"></a></span><span class="src-str"> * therefore be "immune" to character set differences - so no charset</span></div></li> -<li><div class="src-line"><a name="a4107"></a></span><span class="src-str"> * parameter is needed or provided. If a third parameter is passed, it will</span></div></li> -<li><div class="src-line"><a name="a4108"></a></span><span class="src-str"> * be silently ignored.</span></div></li> -<li><div class="src-line"><a name="a4109"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a4110"></a></span><span class="src-str"> * In the OUTPUT there is a minor difference in that we use '&#39;' instead</span></div></li> -<li><div class="src-line"><a name="a4111"></a></span><span class="src-str"> * of PHP's '&#039;' for a single quote: this provides compatibility with</span></div></li> -<li><div class="src-line"><a name="a4112"></a></span><span class="src-str"> * get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES)</span></div></li> -<li><div class="src-line"><a name="a4113"></a></span><span class="src-str"> * (see comment by mikiwoz at yahoo dot co dot uk on</span></div></li> -<li><div class="src-line"><a name="a4114"></a></span><span class="src-str"> * http://php.net/htmlspecialchars); it also matches the entity definition</span></div></li> -<li><div class="src-line"><a name="a4115"></a></span><span class="src-str"> * for XML 1.0</span></div></li> -<li><div class="src-line"><a name="a4116"></a></span><span class="src-str"> * (http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Special_characters).</span></div></li> -<li><div class="src-line"><a name="a4117"></a></span><span class="src-str"> * Like PHP we use a numeric character reference instead of '&apos;' for the</span></div></li> -<li><div class="src-line"><a name="a4118"></a></span><span class="src-str"> * single quote. For the other special characters we use the named entity</span></div></li> -<li><div class="src-line"><a name="a4119"></a></span><span class="src-str"> * references, as PHP is doing.</span></div></li> -<li><div class="src-line"><a name="a4120"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a4121"></a></span><span class="src-str"> * @author {@link http://wikkawiki.org/JavaWoman Marjolein Katsma}</span></div></li> -<li><div class="src-line"><a name="a4122"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a4123"></a></span><span class="src-str"> * @license http://www.gnu.org/copyleft/lgpl.html</span></div></li> -<li><div class="src-line"><a name="a4124"></a></span><span class="src-str"> * GNU Lesser General Public License</span></div></li> -<li><div class="src-line"><a name="a4125"></a></span><span class="src-str"> * @copyright Copyright 2007, {@link http://wikkawiki.org/CreditsPage</span></div></li> -<li><div class="src-line"><a name="a4126"></a></span><span class="src-str"> * Wikka Development Team}</span></div></li> -<li><div class="src-line"><a name="a4127"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a4128"></a></span><span class="src-str"> * @access private</span></div></li> -<li><div class="src-line"><a name="a4129"></a></span><span class="src-str"> * @param string $string string to be converted</span></div></li> -<li><div class="src-line"><a name="a4130"></a></span><span class="src-str"> * @param integer $quote_style</span></div></li> -<li><div class="src-line"><a name="a4131"></a></span><span class="src-str"> * - ENT_COMPAT: escapes &, <, > and double quote (default)</span></div></li> -<li><div class="src-line"><a name="a4132"></a></span><span class="src-str"> * - ENT_NOQUOTES: escapes only &, < and ></span></div></li> -<li><div class="src-line"><a name="a4133"></a></span><span class="src-str"> * - ENT_QUOTES: escapes &, <, >, double and single quotes</span></div></li> -<li><div class="src-line"><a name="a4134"></a></span><span class="src-str"> * @return string converted string</span></div></li> -<li><div class="src-line"><a name="a4135"></a></span><span class="src-str"> * @since 1.0.7.18</span></div></li> -<li><div class="src-line"><a name="a4136"></a></span><span class="src-str"> */</span></div></li> -<li><div class="src-line"><a name="a4137"></a></span><span class="src-str"> <span class="src-key">function</span> <span class="src-id">hsc</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span> <span class="src-var">$quote_style</span> = <span class="src-id">ENT_COMPAT</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4138"></a></span><span class="src-str"> <span class="src-comm">// init</span></span></div></li> -<li><div class="src-line"><a name="a4139"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">static</span> <span class="src-var">$aTransSpecchar</span> = <span class="src-key">array</span><span class="src-sym">(</span></span></div></li> -<li><div class="src-line"><a name="a4140"></a></span><span class="src-str"> <span class="src-str">'&'</span> => <span class="src-str">'&amp;'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a4141"></a></span><span class="src-str"> <span class="src-str">'"'</span> => <span class="src-str">'&quot;'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a4142"></a></span><span class="src-str"> <span class="src-str">'<'</span> => <span class="src-str">'&lt;'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a4143"></a></span><span class="src-str"> <span class="src-str">'>'</span> => <span class="src-str">'&gt;'</span><span class="src-sym">,</span></span></div></li> -<li><div class="src-line"><a name="a4144"></a> </div></li> -<li><div class="src-line"><a name="a4145"></a></span><span class="src-str"> <span class="src-comm">//This fix is related to SF#1923020, but has to be applied</span></span></div></li> -<li><div class="src-line"><a name="a4146"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//regardless of actually highlighting symbols.</span></span></div></li> -<li><div class="src-line"><a name="a4147"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a4148"></a></span><span class="src-str"> <span class="src-comm">//Circumvent a bug with symbol highlighting</span></span></div></li> -<li><div class="src-line"><a name="a4149"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//This is required as ; would produce undesirable side-effects if it</span></span></div></li> -<li><div class="src-line"><a name="a4150"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//was not to be processed as an entity.</span></span></div></li> -<li><div class="src-line"><a name="a4151"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-str">';'</span> => <span class="src-str">'<SEMI>'</span><span class="src-sym">,</span> <span class="src-comm">// Force ; to be processed as entity</span></span></div></li> -<li><div class="src-line"><a name="a4152"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-str">'|'</span> => <span class="src-str">'<PIPE>'</span> <span class="src-comm">// Force | to be processed as entity</span></span></div></li> -<li><div class="src-line"><a name="a4153"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-sym">)</span><span class="src-sym">;</span> <span class="src-comm">// ENT_COMPAT set</span></span></div></li> -<li><div class="src-line"><a name="a4154"></a></span><span class="src-str"><span class="src-comm"></span></span></div></li> -<li><div class="src-line"><a name="a4155"></a></span><span class="src-str"> <span class="src-key">switch</span> <span class="src-sym">(</span><span class="src-var">$quote_style</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4156"></a></span><span class="src-str"> <span class="src-key">case</span> <span class="src-id">ENT_NOQUOTES</span>: <span class="src-comm">// don't convert double quotes</span></span></div></li> -<li><div class="src-line"><a name="a4157"></a></span><span class="src-str"><span class="src-comm"></span> unset<span class="src-sym">(</span><span class="src-var">$aTransSpecchar</span><span class="src-sym">[</span><span class="src-str">'"'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4158"></a></span><span class="src-str"> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4159"></a></span><span class="src-str"> <span class="src-key">case</span> <span class="src-id">ENT_QUOTES</span>: <span class="src-comm">// convert single quotes as well</span></span></div></li> -<li><div class="src-line"><a name="a4160"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$aTransSpecchar</span><span class="src-sym">[</span><span class="src-str">"'"</span><span class="src-sym">]</span> = <span class="src-str">'&#39;'</span><span class="src-sym">;</span> <span class="src-comm">// (apos) htmlspecialchars() uses '&#039;'</span></span></div></li> -<li><div class="src-line"><a name="a4161"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">break</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4162"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4163"></a> </div></li> -<li><div class="src-line"><a name="a4164"></a></span><span class="src-str"> <span class="src-comm">// return translated string</span></span></div></li> -<li><div class="src-line"><a name="a4165"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">return</span> <a href="http://www.php.net/strtr">strtr</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span> <span class="src-var">$aTransSpecchar</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4166"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4167"></a> </div></li> -<li><div class="src-line"><a name="a4168"></a></span><span class="src-str"> /**</span></div></li> -<li><div class="src-line"><a name="a4169"></a></span><span class="src-str"> * Returns a stylesheet for the highlighted code. If $economy mode</span></div></li> -<li><div class="src-line"><a name="a4170"></a></span><span class="src-str"> * is true, we only return the stylesheet declarations that matter for</span></div></li> -<li><div class="src-line"><a name="a4171"></a></span><span class="src-str"> * this code block instead of the whole thing</span></div></li> -<li><div class="src-line"><a name="a4172"></a></span><span class="src-str"> *</span></div></li> -<li><div class="src-line"><a name="a4173"></a></span><span class="src-str"> * @param boolean Whether to use economy mode or not</span></div></li> -<li><div class="src-line"><a name="a4174"></a></span><span class="src-str"> * @return string A stylesheet built on the data for the current language</span></div></li> -<li><div class="src-line"><a name="a4175"></a></span><span class="src-str"> * @since 1.0.0</span></div></li> -<li><div class="src-line"><a name="a4176"></a></span><span class="src-str"> */</span></div></li> -<li><div class="src-line"><a name="a4177"></a></span><span class="src-str"> <span class="src-key">function</span> <a href="../geshi/core/GeSHi.html#methodget_stylesheet">get_stylesheet</a><span class="src-sym">(</span><span class="src-var">$economy_mode</span> = <span class="src-id">true</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4178"></a></span><span class="src-str"> <span class="src-comm">// If there's an error, chances are that the language file</span></span></div></li> -<li><div class="src-line"><a name="a4179"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// won't have populated the language data file, so we can't</span></span></div></li> -<li><div class="src-line"><a name="a4180"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// risk getting a stylesheet...</span></span></div></li> -<li><div class="src-line"><a name="a4181"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methoderror">error</a><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4182"></a></span><span class="src-str"> <span class="src-key">return</span> <span class="src-str">''</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4183"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4184"></a> </div></li> -<li><div class="src-line"><a name="a4185"></a></span><span class="src-str"> <span class="src-comm">//Check if the style rearrangements have been processed ...</span></span></div></li> -<li><div class="src-line"><a name="a4186"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">//This also does some preprocessing to check which style groups are useable ...</span></span></div></li> -<li><div class="src-line"><a name="a4187"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'NUMBERS_CACHE'</span><span class="src-sym">]</span><span class="src-sym">))</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4188"></a></span><span class="src-str"> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">build_style_cache</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4189"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4190"></a> </div></li> -<li><div class="src-line"><a name="a4191"></a></span><span class="src-str"> <span class="src-comm">// First, work out what the selector should be. If there's an ID,</span></span></div></li> -<li><div class="src-line"><a name="a4192"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// that should be used, the same for a class. Otherwise, a selector</span></span></div></li> -<li><div class="src-line"><a name="a4193"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// of '' means that these styles will be applied anywhere</span></span></div></li> -<li><div class="src-line"><a name="a4194"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_id</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4195"></a></span><span class="src-str"> <span class="src-var">$selector</span> = <span class="src-str">'#'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_id</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4196"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4197"></a></span><span class="src-str"> <span class="src-var">$selector</span> = <span class="src-str">'.'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4198"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_class</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4199"></a></span><span class="src-str"> <span class="src-var">$selector</span> .= <span class="src-str">'.'</span> . <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_class</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4200"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4201"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4202"></a></span><span class="src-str"> <span class="src-var">$selector</span> .= <span class="src-str">' '</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4203"></a> </div></li> -<li><div class="src-line"><a name="a4204"></a></span><span class="src-str"> <span class="src-comm">// Header of the stylesheet</span></span></div></li> -<li><div class="src-line"><a name="a4205"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$economy_mode</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4206"></a></span><span class="src-str"> <span class="src-var">$stylesheet</span> = <span class="src-str">"/**\n"</span>.</span></div></li> -<li><div class="src-line"><a name="a4207"></a></span><span class="src-str"> <span class="src-str">" * GeSHi Dynamically Generated Stylesheet\n"</span>.</span></div></li> -<li><div class="src-line"><a name="a4208"></a></span><span class="src-str"> <span class="src-str">" * --------------------------------------\n"</span>.</span></div></li> -<li><div class="src-line"><a name="a4209"></a></span><span class="src-str"> <span class="src-str">"</span></span> * Dynamically generated stylesheet for {<span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language</span><span class="src-sym">}</span>\n<span class="src-str">"</span><span class="src-str">.</span></div></li> -<li><div class="src-line"><a name="a4210"></a></span><span class="src-str"> </span><span class="src-str">"</span> * CSS class: {<span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_class</span><span class="src-sym">}</span>, CSS id: {<span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_id</span><span class="src-sym">}</span>\n<span class="src-str">"</span><span class="src-str">.</span></div></li> -<li><div class="src-line"><a name="a4211"></a></span><span class="src-str"> <span class="src-str">" * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann\n"</span> .</span></div></li> -<li><div class="src-line"><a name="a4212"></a></span><span class="src-str"> <span class="src-str">" * (http://qbnz.com/highlighter/ and http://geshi.org/)\n"</span>.</span></div></li> -<li><div class="src-line"><a name="a4213"></a></span><span class="src-str"> <span class="src-str">" * --------------------------------------\n"</span>.</span></div></li> -<li><div class="src-line"><a name="a4214"></a></span><span class="src-str"> <span class="src-str">" */\n"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4215"></a></span><span class="src-str"> <span class="src-sym">}</span> <span class="src-key">else</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4216"></a></span><span class="src-str"> <span class="src-var">$stylesheet</span> = <span class="src-str">"/**\n"</span>.</span></div></li> -<li><div class="src-line"><a name="a4217"></a></span><span class="src-str"> <span class="src-str">" * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann\n"</span> .</span></div></li> -<li><div class="src-line"><a name="a4218"></a></span><span class="src-str"> <span class="src-str">" * (http://qbnz.com/highlighter/ and http://geshi.org/)\n"</span>.</span></div></li> -<li><div class="src-line"><a name="a4219"></a></span><span class="src-str"> <span class="src-str">" */\n"</span><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4220"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4221"></a> </div></li> -<li><div class="src-line"><a name="a4222"></a></span><span class="src-str"> <span class="src-comm">// Set the <ol> to have no effect at all if there are line numbers</span></span></div></li> -<li><div class="src-line"><a name="a4223"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// (<ol>s have margins that should be destroyed so all layout is</span></span></div></li> -<li><div class="src-line"><a name="a4224"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// controlled by the set_overall_style method, which works on the</span></span></div></li> -<li><div class="src-line"><a name="a4225"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// <pre> or <div> container). Additionally, set default styles for lines</span></span></div></li> -<li><div class="src-line"><a name="a4226"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$economy_mode</span> || <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers</span> != <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a></span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4227"></a></span><span class="src-str"> <span class="src-comm">//$stylesheet .= "$selector, {$selector}ol, {$selector}ol li {margin: 0;}\n";</span></span></div></li> -<li><div class="src-line"><a name="a4228"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-var">$stylesheet</span> .= <span class="src-str">"</span></span><span class="src-var">$selector</span>.de1, <span class="src-var">$selector</span>.de2 {{<span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">code_style</span><span class="src-sym">}</span>}\n<span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4229"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4230"></a> </div></li> -<li><div class="src-line"><a name="a4231"></a></span><span class="src-str"> <span class="src-comm">// Add overall styles</span></span></div></li> -<li><div class="src-line"><a name="a4232"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// note: neglect economy_mode, empty styles are meaningless</span></span></div></li> -<li><div class="src-line"><a name="a4233"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_style</span> != <span class="src-str">''</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4234"></a></span><span class="src-str"> <span class="src-var">$stylesheet</span> .= <span class="src-str">"</span></span><span class="src-var">$selector</span> {{<span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">overall_style</span><span class="src-sym">}</span>}\n<span class="src-str">"</span><span class="src-str"><span class="src-sym">;</span></span></div></li> -<li><div class="src-line"><a name="a4235"></a></span><span class="src-str"> <span class="src-sym">}</span></span></div></li> -<li><div class="src-line"><a name="a4236"></a> </div></li> -<li><div class="src-line"><a name="a4237"></a></span><span class="src-str"> <span class="src-comm">// Add styles for links</span></span></div></li> -<li><div class="src-line"><a name="a4238"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// note: economy mode does not make _any_ sense here</span></span></div></li> -<li><div class="src-line"><a name="a4239"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// either the style is empty and thus no selector is needed</span></span></div></li> -<li><div class="src-line"><a name="a4240"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-comm">// or the appropriate key is given.</span></span></div></li> -<li><div class="src-line"><a name="a4241"></a></span><span class="src-str"><span class="src-comm"></span> <span class="src-key">foreach</span> <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">link_styles</span> <span class="src-key">as</span> <span class="src-var">$key</span> => <span class="src-var">$style</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4242"></a></span><span class="src-str"> <span class="src-key">if</span> <span class="src-sym">(</span><span class="src-var">$style</span> != <span class="src-str">''</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4243"></a></span><span class="src-str"> <span class="src-key">switch</span> <span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span> <span class="src-sym">{</span></span></div></li> -<li><div class="src-line"><a name="a4244"></a></span><span class="src-str"> <span class="src-key">case</span> <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_LINK">GESHI_LINK</a></span>:</span></div></li> -<li><div class="src-line"><a name="a4245"></a></span><span class="src-str"> <span class="src-var">$stylesheet</span> .= <span class="src-str">"</span>{<span class="src-var">$selector</span><span class="src-sym">}</span>a:link {{<span class="src-var">$style</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4246"></a> <span class="src-key">break</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4247"></a> <span class="src-key">case </span><span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HOVER">GESHI_HOVER</a></span>:</div></li> -<li><div class="src-line"><a name="a4248"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span>{<span class="src-var">$selector</span><span class="src-str"></span><span class="src-sym">}</span>a:hover {{<span class="src-var">$style</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4249"></a> <span class="src-key">break</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4250"></a> <span class="src-key">case </span><span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_ACTIVE">GESHI_ACTIVE</a></span>:</div></li> -<li><div class="src-line"><a name="a4251"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span>{<span class="src-var">$selector</span><span class="src-str"></span><span class="src-sym">}</span>a:active {{<span class="src-var">$style</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4252"></a> <span class="src-key">break</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4253"></a> <span class="src-key">case </span><span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_VISITED">GESHI_VISITED</a></span>:</div></li> -<li><div class="src-line"><a name="a4254"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span>{<span class="src-var">$selector</span><span class="src-str"></span><span class="src-sym">}</span>a:visited {{<span class="src-var">$style</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4255"></a> <span class="src-key">break</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4256"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4257"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4258"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4259"></a> </div></li> -<li><div class="src-line"><a name="a4260"></a> <span class="src-comm">// Header and footer</span></div></li> -<li><div class="src-line"><a name="a4261"></a> <span class="src-comm">// note: neglect economy_mode, empty styles are meaningless</span></div></li> -<li><div class="src-line"><a name="a4262"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">header_content_style </span>!= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4263"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.head {{<span class="src-var">$this</span></span><span class="src-sym">-></span><span class="src-id">header_content_style</span><span class="src-str"></span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4264"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4265"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">footer_content_style </span>!= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4266"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.foot {{<span class="src-var">$this</span></span><span class="src-sym">-></span><span class="src-id">footer_content_style</span><span class="src-str"></span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4267"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4268"></a> </div></li> -<li><div class="src-line"><a name="a4269"></a> <span class="src-comm">// Styles for important stuff</span></div></li> -<li><div class="src-line"><a name="a4270"></a> <span class="src-comm">// note: neglect economy_mode, empty styles are meaningless</span></div></li> -<li><div class="src-line"><a name="a4271"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">important_styles </span>!= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4272"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.imp {{<span class="src-var">$this</span></span><span class="src-sym">-></span><span class="src-id">important_styles</span><span class="src-str"></span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4273"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4274"></a> </div></li> -<li><div class="src-line"><a name="a4275"></a> <span class="src-comm">// Simple line number styles</span></div></li> -<li><div class="src-line"><a name="a4276"></a> <span class="src-key">if </span><span class="src-sym">((</span><span class="src-sym">!</span><span class="src-var">$economy_mode </span>|| <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers </span>!= <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a></span><span class="src-sym">) </span>&& <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_style1 </span>!= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4277"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span>{<span class="src-var">$selector</span><span class="src-str"></span><span class="src-sym">}</span>li, {<span class="src-var">$selector</span><span class="src-sym">}</span>.li1 {{<span class="src-var">$this</span></span><span class="src-sym">-></span><span class="src-id">line_style1</span><span class="src-str"></span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4278"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4279"></a> <span class="src-key">if </span><span class="src-sym">((</span><span class="src-sym">!</span><span class="src-var">$economy_mode </span>|| <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers </span>!= <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a></span><span class="src-sym">) </span>&& <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">table_linenumber_style </span>!= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4280"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span>{<span class="src-var">$selector</span><span class="src-str"></span><span class="src-sym">}</span>.ln {{<span class="src-var">$this</span></span><span class="src-sym">-></span><span class="src-id">table_linenumber_style</span><span class="src-str"></span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4281"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4282"></a> <span class="src-comm">// If there is a style set for fancy line numbers, echo it out</span></div></li> -<li><div class="src-line"><a name="a4283"></a> <span class="src-key">if </span><span class="src-sym">((</span><span class="src-sym">!</span><span class="src-var">$economy_mode </span>|| <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_numbers </span>== <span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_FANCY_LINE_NUMBERS">GESHI_FANCY_LINE_NUMBERS</a></span><span class="src-sym">) </span>&& <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">line_style2 </span>!= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4284"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span>{<span class="src-var">$selector</span><span class="src-str"></span><span class="src-sym">}</span>.li2 {{<span class="src-var">$this</span></span><span class="src-sym">-></span><span class="src-id">line_style2</span><span class="src-str"></span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4285"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4286"></a> </div></li> -<li><div class="src-line"><a name="a4287"></a> <span class="src-comm">// note: empty styles are meaningless</span></div></li> -<li><div class="src-line"><a name="a4288"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">] </span><span class="src-key">as </span><span class="src-var">$group </span>=> <span class="src-var">$styles</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4289"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$styles </span>!= <span class="src-str">'' </span>&& <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$economy_mode </span>||</div></li> -<li><div class="src-line"><a name="a4290"></a> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$group</span><span class="src-sym">]</span><span class="src-sym">) </span>&&</div></li> -<li><div class="src-line"><a name="a4291"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'KEYWORDS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$group</span><span class="src-sym">]</span><span class="src-sym">))) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4292"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.kw<span class="src-var">$group</span> {{<span class="src-var">$styles</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4293"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4294"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4295"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">] </span><span class="src-key">as </span><span class="src-var">$group </span>=> <span class="src-var">$styles</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4296"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$styles </span>!= <span class="src-str">'' </span>&& <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$economy_mode </span>||</div></li> -<li><div class="src-line"><a name="a4297"></a> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$group</span><span class="src-sym">]</span><span class="src-sym">) </span>&&</div></li> -<li><div class="src-line"><a name="a4298"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'COMMENTS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$group</span><span class="src-sym">]</span><span class="src-sym">) </span>||</div></li> -<li><div class="src-line"><a name="a4299"></a> <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'COMMENT_REGEXP'</span><span class="src-sym">]</span><span class="src-sym">) </span>&&</div></li> -<li><div class="src-line"><a name="a4300"></a> <span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'COMMENT_REGEXP'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$group</span><span class="src-sym">]</span><span class="src-sym">)))) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4301"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.co<span class="src-var">$group</span> {{<span class="src-var">$styles</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4302"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4303"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4304"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">] </span><span class="src-key">as </span><span class="src-var">$group </span>=> <span class="src-var">$styles</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4305"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$styles </span>!= <span class="src-str">'' </span>&& <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$economy_mode </span>|| <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'ESCAPE_CHAR'</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4306"></a> <span class="src-comm">// NEW: since 1.0.8 we have to handle hardescapes</span></div></li> -<li><div class="src-line"><a name="a4307"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$group </span>=== <span class="src-str">'HARD'</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4308"></a> <span class="src-var">$group </span>= <span class="src-str">'_h'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4309"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4310"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.es<span class="src-var">$group</span> {{<span class="src-var">$styles</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4311"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4312"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4313"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">] </span><span class="src-key">as </span><span class="src-var">$group </span>=> <span class="src-var">$styles</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4314"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$styles </span>!= <span class="src-str">'' </span>&& <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$economy_mode </span>|| <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'BRACKETS'</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4315"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.br<span class="src-var">$group</span> {{<span class="src-var">$styles</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4316"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4317"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4318"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'SYMBOLS'</span><span class="src-sym">] </span><span class="src-key">as </span><span class="src-var">$group </span>=> <span class="src-var">$styles</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4319"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$styles </span>!= <span class="src-str">'' </span>&& <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$economy_mode </span>|| <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'SYMBOLS'</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4320"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.sy<span class="src-var">$group</span> {{<span class="src-var">$styles</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4321"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4322"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4323"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'STRINGS'</span><span class="src-sym">] </span><span class="src-key">as </span><span class="src-var">$group </span>=> <span class="src-var">$styles</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4324"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$styles </span>!= <span class="src-str">'' </span>&& <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$economy_mode </span>|| <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'STRINGS'</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4325"></a> <span class="src-comm">// NEW: since 1.0.8 we have to handle hardquotes</span></div></li> -<li><div class="src-line"><a name="a4326"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$group </span>=== <span class="src-str">'HARD'</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4327"></a> <span class="src-var">$group </span>= <span class="src-str">'_h'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4328"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4329"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.st<span class="src-var">$group</span> {{<span class="src-var">$styles</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4330"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4331"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4332"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">] </span><span class="src-key">as </span><span class="src-var">$group </span>=> <span class="src-var">$styles</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4333"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$styles </span>!= <span class="src-str">'' </span>&& <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$economy_mode </span>|| <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'NUMBERS'</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4334"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.nu<span class="src-var">$group</span> {{<span class="src-var">$styles</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4335"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4336"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4337"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'METHODS'</span><span class="src-sym">] </span><span class="src-key">as </span><span class="src-var">$group </span>=> <span class="src-var">$styles</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4338"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$styles </span>!= <span class="src-str">'' </span>&& <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$economy_mode </span>|| <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'METHODS'</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4339"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.me<span class="src-var">$group</span> {{<span class="src-var">$styles</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4340"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4341"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4342"></a> <span class="src-comm">// note: neglect economy_mode, empty styles are meaningless</span></div></li> -<li><div class="src-line"><a name="a4343"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'SCRIPT'</span><span class="src-sym">] </span><span class="src-key">as </span><span class="src-var">$group </span>=> <span class="src-var">$styles</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4344"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$styles </span>!= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4345"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.sc<span class="src-var">$group</span> {{<span class="src-var">$styles</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4346"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4347"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4348"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'STYLES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">] </span><span class="src-key">as </span><span class="src-var">$group </span>=> <span class="src-var">$styles</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4349"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$styles </span>!= <span class="src-str">'' </span>&& <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$economy_mode </span>||</div></li> -<li><div class="src-line"><a name="a4350"></a> <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$group</span><span class="src-sym">]</span><span class="src-sym">) </span>&&</div></li> -<li><div class="src-line"><a name="a4351"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">lexic_permissions</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$group</span><span class="src-sym">]</span><span class="src-sym">))) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4352"></a> <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$group</span><span class="src-sym">]</span><span class="src-sym">) </span>&&</div></li> -<li><div class="src-line"><a name="a4353"></a> <a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-id">GESHI_CLASS</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$group</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4354"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4355"></a> <span class="src-var">$stylesheet </span>.= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">language_data</span><span class="src-sym">[</span><span class="src-str">'REGEXPS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$group</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">GESHI_CLASS</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4356"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"> {{<span class="src-var">$styles</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4357"></a> <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4358"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span><span class="src-str"><span class="src-var">$selector</span>.re<span class="src-var">$group</span> {{<span class="src-var">$styles</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4359"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4360"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4361"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4362"></a> <span class="src-comm">// Styles for lines being highlighted extra</span></div></li> -<li><div class="src-line"><a name="a4363"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$economy_mode </span>|| <span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines</span><span class="src-sym">)</span>!=<a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines_styles</span><span class="src-sym">))) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4364"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span>{<span class="src-var">$selector</span><span class="src-str"></span><span class="src-sym">}</span>.ln-xtra, {<span class="src-var">$selector</span><span class="src-sym">}</span>li.ln-xtra, {<span class="src-var">$selector</span><span class="src-sym">}</span>div.ln-xtra {{<span class="src-var">$this</span></span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines_style</span><span class="src-str"></span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4365"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4366"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span>{<span class="src-var">$selector</span><span class="src-str"></span><span class="src-sym">}</span>span.xtra { display:block; }\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4367"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines_styles </span><span class="src-key">as </span><span class="src-var">$lineid </span>=> <span class="src-var">$linestyle</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4368"></a> <span class="src-var">$stylesheet </span>.= <span class="src-str">"</span>{<span class="src-var">$selector</span><span class="src-str"></span><span class="src-sym">}</span>.lx<span class="src-var">$lineid</span>, {<span class="src-var">$selector</span><span class="src-sym">}</span>li.lx<span class="src-var">$lineid</span>, {<span class="src-var">$selector</span><span class="src-sym">}</span>div.lx<span class="src-var">$lineid</span> {{<span class="src-var">$linestyle</span><span class="src-sym">}</span>}\n</span><span class="src-str">"</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4369"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4370"></a> </div></li> -<li><div class="src-line"><a name="a4371"></a> <span class="src-key">return </span><span class="src-var">$stylesheet</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4372"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4373"></a> </div></li> -<li><div class="src-line"><a name="a4374"></a> /**</div></li> -<li><div class="src-line"><a name="a4375"></a> * Get's the style that is used for the specified line</div></li> -<li><div class="src-line"><a name="a4376"></a> *</div></li> -<li><div class="src-line"><a name="a4377"></a> * @param int The line number information is requested for</div></li> -<li><div class="src-line"><a name="a4378"></a> * @access private</div></li> -<li><div class="src-line"><a name="a4379"></a> * @since 1.0.7.21</div></li> -<li><div class="src-line"><a name="a4380"></a> */</div></li> -<li><div class="src-line"><a name="a4381"></a> <span class="src-key">function </span><span class="src-id">get_line_style</span><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4382"></a> <span class="src-comm">//$style = null;</span></div></li> -<li><div class="src-line"><a name="a4383"></a> <span class="src-var">$style </span>= <span class="src-id">null</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4384"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines_styles</span><span class="src-sym">[</span><span class="src-var">$line</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4385"></a> <span class="src-var">$style </span>= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines_styles</span><span class="src-sym">[</span><span class="src-var">$line</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4386"></a> <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{ </span><span class="src-comm">// if no "extra" style assigned</span></div></li> -<li><div class="src-line"><a name="a4387"></a> <span class="src-var">$style </span>= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">highlight_extra_lines_style</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4388"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4389"></a> </div></li> -<li><div class="src-line"><a name="a4390"></a> <span class="src-key">return </span><span class="src-var">$style</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4391"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4392"></a> </div></li> -<li><div class="src-line"><a name="a4393"></a> /**</div></li> -<li><div class="src-line"><a name="a4394"></a> * this functions creates an optimized regular expression list</div></li> -<li><div class="src-line"><a name="a4395"></a> * of an array of strings.</div></li> -<li><div class="src-line"><a name="a4396"></a> *</div></li> -<li><div class="src-line"><a name="a4397"></a> * Example:</div></li> -<li><div class="src-line"><a name="a4398"></a> * <code>$list = array('faa', 'foo', 'foobar');</div></li> -<li><div class="src-line"><a name="a4399"></a> * => string 'f(aa|oo(bar)?)'</code></div></li> -<li><div class="src-line"><a name="a4400"></a> *</div></li> -<li><div class="src-line"><a name="a4401"></a> * @param $list array of (unquoted) strings</div></li> -<li><div class="src-line"><a name="a4402"></a> * @param $regexp_delimiter your regular expression delimiter, @see preg_quote()</div></li> -<li><div class="src-line"><a name="a4403"></a> * @return string for regular expression</div></li> -<li><div class="src-line"><a name="a4404"></a> * @author Milian Wolff <mail@milianw.de></div></li> -<li><div class="src-line"><a name="a4405"></a> * @since 1.0.8</div></li> -<li><div class="src-line"><a name="a4406"></a> * @access private</div></li> -<li><div class="src-line"><a name="a4407"></a> */</div></li> -<li><div class="src-line"><a name="a4408"></a> <span class="src-key">function </span><span class="src-id">optimize_regexp_list</span><span class="src-sym">(</span><span class="src-var">$list</span><span class="src-sym">, </span><span class="src-var">$regexp_delimiter </span>= <span class="src-str">'/'</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4409"></a> <span class="src-var">$regex_chars </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'.'</span><span class="src-sym">, </span><span class="src-str">'\\'</span><span class="src-sym">, </span><span class="src-str">'+'</span><span class="src-sym">, </span><span class="src-str">'*'</span><span class="src-sym">, </span><span class="src-str">'?'</span><span class="src-sym">, </span><span class="src-str">'['</span><span class="src-sym">, </span><span class="src-str">'^'</span><span class="src-sym">, </span><span class="src-str">']'</span><span class="src-sym">, </span><span class="src-str">'$'</span><span class="src-sym">,</span></div></li> -<li><div class="src-line"><a name="a4410"></a> <span class="src-str">'('</span><span class="src-sym">, </span><span class="src-str">')'</span><span class="src-sym">, </span><span class="src-str">'{'</span><span class="src-sym">, </span><span class="src-str">'}'</span><span class="src-sym">, </span><span class="src-str">'='</span><span class="src-sym">, </span><span class="src-str">'!'</span><span class="src-sym">, </span><span class="src-str">'<'</span><span class="src-sym">, </span><span class="src-str">'>'</span><span class="src-sym">, </span><span class="src-str">'|'</span><span class="src-sym">, </span><span class="src-str">':'</span><span class="src-sym">, </span><span class="src-var">$regexp_delimiter</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4411"></a> <a href="http://www.php.net/sort">sort</a><span class="src-sym">(</span><span class="src-var">$list</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4412"></a> <span class="src-var">$regexp_list </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">''</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4413"></a> <span class="src-var">$num_subpatterns </span>= <span class="src-num">0</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4414"></a> <span class="src-var">$list_key </span>= <span class="src-num">0</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4415"></a> </div></li> -<li><div class="src-line"><a name="a4416"></a> <span class="src-comm">// the tokens which we will use to generate the regexp list</span></div></li> -<li><div class="src-line"><a name="a4417"></a> <span class="src-var">$tokens </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4418"></a> <span class="src-var">$prev_keys </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4419"></a> <span class="src-comm">// go through all entries of the list and generate the token list</span></div></li> -<li><div class="src-line"><a name="a4420"></a> <span class="src-var">$cur_len </span>= <span class="src-num">0</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4421"></a> <span class="src-key">for </span><span class="src-sym">(</span><span class="src-var">$i </span>= <span class="src-num">0</span><span class="src-sym">, </span><span class="src-var">$i_max </span>= <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$list</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-var">$i </span>< <span class="src-var">$i_max</span><span class="src-sym">; </span>++<span class="src-var">$i</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4422"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$cur_len </span>> <span class="src-id">GESHI_MAX_PCRE_LENGTH</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4423"></a> <span class="src-comm">// seems like the length of this pcre is growing exorbitantly</span></div></li> -<li><div class="src-line"><a name="a4424"></a> <span class="src-var">$regexp_list</span><span class="src-sym">[</span>++<span class="src-var">$list_key</span><span class="src-sym">] </span>= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_optimize_regexp_list_tokens_to_string</span><span class="src-sym">(</span><span class="src-var">$tokens</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4425"></a> <span class="src-var">$num_subpatterns </span>= <a href="http://www.php.net/substr_count">substr_count</a><span class="src-sym">(</span><span class="src-var">$regexp_list</span><span class="src-sym">[</span><span class="src-var">$list_key</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-str">'(?:'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4426"></a> <span class="src-var">$tokens </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4427"></a> <span class="src-var">$cur_len </span>= <span class="src-num">0</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4428"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4429"></a> <span class="src-var">$level </span>= <span class="src-num">0</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4430"></a> <span class="src-var">$entry </span>= <a href="http://www.php.net/preg_quote">preg_quote</a><span class="src-sym">(</span>(string) <span class="src-var">$list</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$regexp_delimiter</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4431"></a> <span class="src-var">$pointer </span>= <span class="src-sym">&</span><span class="src-var">$tokens</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4432"></a> <span class="src-comm">// properly assign the new entry to the correct position in the token array</span></div></li> -<li><div class="src-line"><a name="a4433"></a> <span class="src-comm">// possibly generate smaller common denominator keys</span></div></li> -<li><div class="src-line"><a name="a4434"></a> <span class="src-key">while </span><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4435"></a> <span class="src-comm">// get the common denominator</span></div></li> -<li><div class="src-line"><a name="a4436"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$prev_keys</span><span class="src-sym">[</span><span class="src-var">$level</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4437"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$prev_keys</span><span class="src-sym">[</span><span class="src-var">$level</span><span class="src-sym">] </span>== <span class="src-var">$entry</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4438"></a> <span class="src-comm">// this is a duplicate entry, skip it</span></div></li> -<li><div class="src-line"><a name="a4439"></a> <span class="src-key">continue </span><span class="src-num">2</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4440"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4441"></a> <span class="src-var">$char </span>= <span class="src-num">0</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4442"></a> <span class="src-key">while </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$entry</span><span class="src-sym">[</span><span class="src-var">$char</span><span class="src-sym">]</span><span class="src-sym">) </span>&& isset<span class="src-sym">(</span><span class="src-var">$prev_keys</span><span class="src-sym">[</span><span class="src-var">$level</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$char</span><span class="src-sym">]</span><span class="src-sym">)</span></div></li> -<li><div class="src-line"><a name="a4443"></a> && <span class="src-var">$entry</span><span class="src-sym">[</span><span class="src-var">$char</span><span class="src-sym">] </span>== <span class="src-var">$prev_keys</span><span class="src-sym">[</span><span class="src-var">$level</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$char</span><span class="src-sym">]</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4444"></a> ++<span class="src-var">$char</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4445"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4446"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$char </span>> <span class="src-num">0</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4447"></a> <span class="src-comm">// this entry has at least some chars in common with the current key</span></div></li> -<li><div class="src-line"><a name="a4448"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$char </span>== <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$prev_keys</span><span class="src-sym">[</span><span class="src-var">$level</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4449"></a> <span class="src-comm">// current key is totally matched, i.e. this entry has just some bits appended</span></div></li> -<li><div class="src-line"><a name="a4450"></a> <span class="src-var">$pointer </span>= <span class="src-sym">&</span><span class="src-var">$pointer</span><span class="src-sym">[</span><span class="src-var">$prev_keys</span><span class="src-sym">[</span><span class="src-var">$level</span><span class="src-sym">]]</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4451"></a> <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4452"></a> <span class="src-comm">// only part of the keys match</span></div></li> -<li><div class="src-line"><a name="a4453"></a> <span class="src-var">$new_key_part1 </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$prev_keys</span><span class="src-sym">[</span><span class="src-var">$level</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">, </span><span class="src-var">$char</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4454"></a> <span class="src-var">$new_key_part2 </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$prev_keys</span><span class="src-sym">[</span><span class="src-var">$level</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$char</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4455"></a> </div></li> -<li><div class="src-line"><a name="a4456"></a> <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/in_array">in_array</a><span class="src-sym">(</span><span class="src-var">$new_key_part1</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$regex_chars</span><span class="src-sym">)</span></div></li> -<li><div class="src-line"><a name="a4457"></a> || <a href="http://www.php.net/in_array">in_array</a><span class="src-sym">(</span><span class="src-var">$new_key_part2</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$regex_chars</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4458"></a> <span class="src-comm">// this is bad, a regex char as first character</span></div></li> -<li><div class="src-line"><a name="a4459"></a> <span class="src-var">$pointer</span><span class="src-sym">[</span><span class="src-var">$entry</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'' </span>=> <span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4460"></a> <a href="http://www.php.net/array_splice">array_splice</a><span class="src-sym">(</span><span class="src-var">$prev_keys</span><span class="src-sym">, </span><span class="src-var">$level</span><span class="src-sym">, </span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$prev_keys</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$entry</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4461"></a> <span class="src-var">$cur_len </span>+= <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$entry</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4462"></a> <span class="src-key">continue</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4463"></a> <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4464"></a> <span class="src-comm">// relocate previous tokens</span></div></li> -<li><div class="src-line"><a name="a4465"></a> <span class="src-var">$pointer</span><span class="src-sym">[</span><span class="src-var">$new_key_part1</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$new_key_part2 </span>=> <span class="src-var">$pointer</span><span class="src-sym">[</span><span class="src-var">$prev_keys</span><span class="src-sym">[</span><span class="src-var">$level</span><span class="src-sym">]]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4466"></a> unset<span class="src-sym">(</span><span class="src-var">$pointer</span><span class="src-sym">[</span><span class="src-var">$prev_keys</span><span class="src-sym">[</span><span class="src-var">$level</span><span class="src-sym">]]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4467"></a> <span class="src-var">$pointer </span>= <span class="src-sym">&</span><span class="src-var">$pointer</span><span class="src-sym">[</span><span class="src-var">$new_key_part1</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4468"></a> <span class="src-comm">// recreate key index</span></div></li> -<li><div class="src-line"><a name="a4469"></a> <a href="http://www.php.net/array_splice">array_splice</a><span class="src-sym">(</span><span class="src-var">$prev_keys</span><span class="src-sym">, </span><span class="src-var">$level</span><span class="src-sym">, </span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$prev_keys</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$new_key_part1</span><span class="src-sym">, </span><span class="src-var">$new_key_part2</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4470"></a> <span class="src-var">$cur_len </span>+= <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$new_key_part2</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4471"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4472"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4473"></a> ++<span class="src-var">$level</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4474"></a> <span class="src-var">$entry </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$entry</span><span class="src-sym">, </span><span class="src-var">$char</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4475"></a> <span class="src-key">continue</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4476"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4477"></a> <span class="src-comm">// else: fall trough, i.e. no common denominator was found</span></div></li> -<li><div class="src-line"><a name="a4478"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4479"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$level </span>== <span class="src-num">0 </span>&& <span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$tokens</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4480"></a> <span class="src-comm">// we can dump current tokens into the string and throw them away afterwards</span></div></li> -<li><div class="src-line"><a name="a4481"></a> <span class="src-var">$new_entry </span>= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_optimize_regexp_list_tokens_to_string</span><span class="src-sym">(</span><span class="src-var">$tokens</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4482"></a> <span class="src-var">$new_subpatterns </span>= <a href="http://www.php.net/substr_count">substr_count</a><span class="src-sym">(</span><span class="src-var">$new_entry</span><span class="src-sym">, </span><span class="src-str">'(?:'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4483"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-id">GESHI_MAX_PCRE_SUBPATTERNS </span>&& <span class="src-var">$num_subpatterns </span>+ <span class="src-var">$new_subpatterns </span>> <span class="src-id">GESHI_MAX_PCRE_SUBPATTERNS</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4484"></a> <span class="src-var">$regexp_list</span><span class="src-sym">[</span>++<span class="src-var">$list_key</span><span class="src-sym">] </span>= <span class="src-var">$new_entry</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4485"></a> <span class="src-var">$num_subpatterns </span>= <span class="src-var">$new_subpatterns</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4486"></a> <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4487"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$regexp_list</span><span class="src-sym">[</span><span class="src-var">$list_key</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4488"></a> <span class="src-var">$new_entry </span>= <span class="src-str">'|' </span>. <span class="src-var">$new_entry</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4489"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4490"></a> <span class="src-var">$regexp_list</span><span class="src-sym">[</span><span class="src-var">$list_key</span><span class="src-sym">] </span>.= <span class="src-var">$new_entry</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4491"></a> <span class="src-var">$num_subpatterns </span>+= <span class="src-var">$new_subpatterns</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4492"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4493"></a> <span class="src-var">$tokens </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4494"></a> <span class="src-var">$cur_len </span>= <span class="src-num">0</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4495"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4496"></a> <span class="src-comm">// no further common denominator found</span></div></li> -<li><div class="src-line"><a name="a4497"></a> <span class="src-var">$pointer</span><span class="src-sym">[</span><span class="src-var">$entry</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'' </span>=> <span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4498"></a> <a href="http://www.php.net/array_splice">array_splice</a><span class="src-sym">(</span><span class="src-var">$prev_keys</span><span class="src-sym">, </span><span class="src-var">$level</span><span class="src-sym">, </span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$prev_keys</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$entry</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4499"></a> </div></li> -<li><div class="src-line"><a name="a4500"></a> <span class="src-var">$cur_len </span>+= <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$entry</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4501"></a> <span class="src-key">break</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4502"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4503"></a> unset<span class="src-sym">(</span><span class="src-var">$list</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4504"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4505"></a> <span class="src-comm">// make sure the last tokens get converted as well</span></div></li> -<li><div class="src-line"><a name="a4506"></a> <span class="src-var">$new_entry </span>= <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_optimize_regexp_list_tokens_to_string</span><span class="src-sym">(</span><span class="src-var">$tokens</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4507"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-id">GESHI_MAX_PCRE_SUBPATTERNS </span>&& <span class="src-var">$num_subpatterns </span>+ <a href="http://www.php.net/substr_count">substr_count</a><span class="src-sym">(</span><span class="src-var">$new_entry</span><span class="src-sym">, </span><span class="src-str">'(?:'</span><span class="src-sym">) </span>> <span class="src-id">GESHI_MAX_PCRE_SUBPATTERNS</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4508"></a> <span class="src-var">$regexp_list</span><span class="src-sym">[</span>++<span class="src-var">$list_key</span><span class="src-sym">] </span>= <span class="src-var">$new_entry</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4509"></a> <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4510"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$regexp_list</span><span class="src-sym">[</span><span class="src-var">$list_key</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4511"></a> <span class="src-var">$new_entry </span>= <span class="src-str">'|' </span>. <span class="src-var">$new_entry</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4512"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4513"></a> <span class="src-var">$regexp_list</span><span class="src-sym">[</span><span class="src-var">$list_key</span><span class="src-sym">] </span>.= <span class="src-var">$new_entry</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4514"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4515"></a> <span class="src-key">return </span><span class="src-var">$regexp_list</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4516"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4517"></a> /**</div></li> -<li><div class="src-line"><a name="a4518"></a> * this function creates the appropriate regexp string of an token array</div></li> -<li><div class="src-line"><a name="a4519"></a> * you should not call this function directly, @see $this->optimize_regexp_list().</div></li> -<li><div class="src-line"><a name="a4520"></a> *</div></li> -<li><div class="src-line"><a name="a4521"></a> * @param &$tokens array of tokens</div></li> -<li><div class="src-line"><a name="a4522"></a> * @param $recursed bool to know wether we recursed or not</div></li> -<li><div class="src-line"><a name="a4523"></a> * @return string</div></li> -<li><div class="src-line"><a name="a4524"></a> * @author Milian Wolff <mail@milianw.de></div></li> -<li><div class="src-line"><a name="a4525"></a> * @since 1.0.8</div></li> -<li><div class="src-line"><a name="a4526"></a> * @access private</div></li> -<li><div class="src-line"><a name="a4527"></a> */</div></li> -<li><div class="src-line"><a name="a4528"></a> <span class="src-key">function </span><span class="src-id">_optimize_regexp_list_tokens_to_string</span><span class="src-sym">(</span><span class="src-sym">&</span><span class="src-var">$tokens</span><span class="src-sym">, </span><span class="src-var">$recursed </span>= <span class="src-id">false</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4529"></a> <span class="src-var">$list </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4530"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$tokens </span><span class="src-key">as </span><span class="src-var">$token </span>=> <span class="src-var">$sub_tokens</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4531"></a> <span class="src-var">$list </span>.= <span class="src-var">$token</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4532"></a> <span class="src-var">$close_entry </span>= isset<span class="src-sym">(</span><span class="src-var">$sub_tokens</span><span class="src-sym">[</span><span class="src-str">''</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4533"></a> unset<span class="src-sym">(</span><span class="src-var">$sub_tokens</span><span class="src-sym">[</span><span class="src-str">''</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4534"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$sub_tokens</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4535"></a> <span class="src-var">$list </span>.= <span class="src-str">'(?:' </span>. <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_optimize_regexp_list_tokens_to_string</span><span class="src-sym">(</span><span class="src-var">$sub_tokens</span><span class="src-sym">, </span><span class="src-id">true</span><span class="src-sym">) </span>. <span class="src-str">')'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4536"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$close_entry</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4537"></a> <span class="src-comm">// make sub_tokens optional</span></div></li> -<li><div class="src-line"><a name="a4538"></a> <span class="src-var">$list </span>.= <span class="src-str">'?'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4539"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4540"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4541"></a> <span class="src-var">$list </span>.= <span class="src-str">'|'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4542"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4543"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$recursed</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4544"></a> <span class="src-comm">// do some optimizations</span></div></li> -<li><div class="src-line"><a name="a4545"></a> <span class="src-comm">// common trailing strings</span></div></li> -<li><div class="src-line"><a name="a4546"></a> <span class="src-comm">// BUGGY!</span></div></li> -<li><div class="src-line"><a name="a4547"></a> <span class="src-comm">//$list = preg_replace_callback('#(?<=^|\:|\|)\w+?(\w+)(?:\|.+\1)+(?=\|)#', create_function(</span></div></li> -<li><div class="src-line"><a name="a4548"></a> <span class="src-comm">// '$matches', 'return "(?:" . preg_replace("#" . preg_quote($matches[1], "#") . "(?=\||$)#", "", $matches[0]) . ")" . $matches[1];'), $list);</span></div></li> -<li><div class="src-line"><a name="a4549"></a> <span class="src-comm">// (?:p)? => p?</span></div></li> -<li><div class="src-line"><a name="a4550"></a> <span class="src-var">$list </span>= <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'#\(\?\:(.)\)\?#'</span><span class="src-sym">, </span><span class="src-str">'\1?'</span><span class="src-sym">, </span><span class="src-var">$list</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4551"></a> <span class="src-comm">// (?:a|b|c|d|...)? => [abcd...]?</span></div></li> -<li><div class="src-line"><a name="a4552"></a> <span class="src-comm">// TODO: a|bb|c => [ac]|bb</span></div></li> -<li><div class="src-line"><a name="a4553"></a> <span class="src-key">static </span><span class="src-var">$callback_2</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4554"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$callback_2</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4555"></a> <span class="src-var">$callback_2 </span>= <a href="http://www.php.net/create_function">create_function</a><span class="src-sym">(</span><span class="src-str">'$matches'</span><span class="src-sym">, </span><span class="src-str">'return "[" . str_replace("|", "", $matches[1]) . "]";'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4556"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4557"></a> <span class="src-var">$list </span>= <a href="http://www.php.net/preg_replace_callback">preg_replace_callback</a><span class="src-sym">(</span><span class="src-str">'#\(\?\:((?:.\|)+.)\)#'</span><span class="src-sym">, </span><span class="src-var">$callback_2</span><span class="src-sym">, </span><span class="src-var">$list</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4558"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4559"></a> <span class="src-comm">// return $list without trailing pipe</span></div></li> -<li><div class="src-line"><a name="a4560"></a> <span class="src-key">return </span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$list</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">, </span>-<span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4561"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4562"></a><span class="src-sym">} </span><span class="src-comm">// End Class GeSHi</span></div></li> -<li><div class="src-line"><a name="a4563"></a> </div></li> -<li><div class="src-line"><a name="a4564"></a> </div></li> -<li><div class="src-line"><a name="a4565"></a><span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/function_exists">function_exists</a><span class="src-sym">(</span><span class="src-str">'geshi_highlight'</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4566"></a> /**</div></li> -<li><div class="src-line"><a name="a4567"></a> * Easy way to highlight stuff. Behaves just like highlight_string</div></li> -<li><div class="src-line"><a name="a4568"></a> *</div></li> -<li><div class="src-line"><a name="a4569"></a> * @param string The code to highlight</div></li> -<li><div class="src-line"><a name="a4570"></a> * @param string The language to highlight the code in</div></li> -<li><div class="src-line"><a name="a4571"></a> * @param string The path to the language files. You can leave this blank if you need</div></li> -<li><div class="src-line"><a name="a4572"></a> * as from version 1.0.7 the path should be automatically detected</div></li> -<li><div class="src-line"><a name="a4573"></a> * @param boolean Whether to return the result or to echo</div></li> -<li><div class="src-line"><a name="a4574"></a> * @return string The code highlighted (if $return is true)</div></li> -<li><div class="src-line"><a name="a4575"></a> * @since 1.0.2</div></li> -<li><div class="src-line"><a name="a4576"></a> */</div></li> -<li><div class="src-line"><a name="a4577"></a> <span class="src-key">function </span><a href="../geshi/core/_geshi.php.html#functiongeshi_highlight">geshi_highlight</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-var">$language</span><span class="src-sym">, </span><span class="src-var">$path </span>= <span class="src-id">null</span><span class="src-sym">, </span><span class="src-var">$return </span>= <span class="src-id">false</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4578"></a> <span class="src-var">$geshi </span>= <span class="src-key">new </span><a href="../geshi/core/GeSHi.html#methodGeSHi">GeSHi</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-var">$language</span><span class="src-sym">, </span><span class="src-var">$path</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4579"></a> <span class="src-var">$geshi</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodset_header_type">set_header_type</a><span class="src-sym">(</span><span class="src-id"><a href="../geshi/core/_geshi.php.html#defineGESHI_HEADER_NONE">GESHI_HEADER_NONE</a></span><span class="src-sym">)</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4580"></a> </div></li> -<li><div class="src-line"><a name="a4581"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$return</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4582"></a> <span class="src-key">return </span><span class="src-str">'<code>' </span>. <span class="src-var">$geshi</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodparse_code">parse_code</a><span class="src-sym">(</span><span class="src-sym">) </span>. <span class="src-str">'</code>'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4583"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4584"></a> </div></li> -<li><div class="src-line"><a name="a4585"></a> echo <span class="src-str">'<code>' </span>. <span class="src-var">$geshi</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methodparse_code">parse_code</a><span class="src-sym">(</span><span class="src-sym">) </span>. <span class="src-str">'</code>'</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4586"></a> </div></li> -<li><div class="src-line"><a name="a4587"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$geshi</span><span class="src-sym">-></span><a href="../geshi/core/GeSHi.html#methoderror">error</a><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li> -<li><div class="src-line"><a name="a4588"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4589"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4590"></a> <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></div></li> -<li><div class="src-line"><a name="a4591"></a> <span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4592"></a><span class="src-sym">}</span></div></li> -<li><div class="src-line"><a name="a4593"></a> </div></li> -<li><div class="src-line"><a name="a4594"></a><span class="src-php">?></span></div></li> -</ol></div> -</div> - <p class="notes" id="credit"> - Documentation generated on Thu, 25 Dec 2008 14:34:52 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a> - </p> - </body> -</html>
\ No newline at end of file diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/blank.html b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/blank.html deleted file mode 100644 index d44ac468..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/blank.html +++ /dev/null @@ -1,13 +0,0 @@ -<html> -<head> - <title>GeSHi 1.0.8</title> - <link rel="stylesheet" href="media/stylesheet.css" /> - <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> -</head> -<body> -<div align="center"><h1>GeSHi 1.0.8</h1></div> -<b>Welcome to geshi!</b><br /> -<br /> -This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.2</a><br /> -</body> -</html>
\ No newline at end of file diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/classtrees_geshi.html b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/classtrees_geshi.html deleted file mode 100644 index e5c3868e..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/classtrees_geshi.html +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <!-- template designed by Marco Von Ballmoos --> - <title></title> - <link rel="stylesheet" href="media/stylesheet.css" /> - <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> - </head> - <body> - -<!-- Start of Class Data --> -<H2> - -</H2> -<h2>Root class GeSHi</h2> -<ul> -<li><a href="geshi/core/GeSHi.html">GeSHi</a></li></ul> - - <p class="notes" id="credit"> - Documentation generated on Thu, 25 Dec 2008 14:34:34 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a> - </p> - </body> -</html>
\ No newline at end of file diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/elementindex.html b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/elementindex.html deleted file mode 100644 index f808e36b..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/elementindex.html +++ /dev/null @@ -1,867 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <!-- template designed by Marco Von Ballmoos --> - <title></title> - <link rel="stylesheet" href="media/stylesheet.css" /> - <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> - </head> - <body> - <a name="top"></a> -<h2>Full index</h2> -<h3>Package indexes</h3> -<ul> - <li><a href="elementindex_geshi.html">geshi</a></li> -</ul> -<br /> -<div class="index-letter-menu"> - <a class="index-letter" href="elementindex.html#a">a</a> - <a class="index-letter" href="elementindex.html#d">d</a> - <a class="index-letter" href="elementindex.html#e">e</a> - <a class="index-letter" href="elementindex.html#g">g</a> - <a class="index-letter" href="elementindex.html#h">h</a> - <a class="index-letter" href="elementindex.html#l">l</a> - <a class="index-letter" href="elementindex.html#o">o</a> - <a class="index-letter" href="elementindex.html#p">p</a> - <a class="index-letter" href="elementindex.html#r">r</a> - <a class="index-letter" href="elementindex.html#s">s</a> -</div> - - <a name="a"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">a</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">add_keyword</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodadd_keyword">GeSHi::add_keyword()</a> in geshi.php</div> - <div class="index-item-description">Adds a keyword to a keyword group for highlighting</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">add_keyword_group</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodadd_keyword_group">GeSHi::add_keyword_group()</a> in geshi.php</div> - <div class="index-item-description">Creates a new keyword group</div> - </dd> - </dl> - <a name="d"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">d</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">disable_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methoddisable_highlighting">GeSHi::disable_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Disables all highlighting</div> - </dd> - </dl> - <a name="e"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">e</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_classes</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_classes">GeSHi::enable_classes()</a> in geshi.php</div> - <div class="index-item-description">Sets whether CSS classes should be used to highlight the source. Default is off, calling this method with no arguments will turn it on</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_highlighting">GeSHi::enable_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Enables all highlighting</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_ids</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_ids">GeSHi::enable_ids()</a> in geshi.php</div> - <div class="index-item-description">Whether CSS IDs should be added to each line</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_important_blocks</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_important_blocks">GeSHi::enable_important_blocks()</a> in geshi.php</div> - <div class="index-item-description">Sets whether context-important blocks are highlighted</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_inner_code_block</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_inner_code_block">GeSHi::enable_inner_code_block()</a> in geshi.php</div> - <div class="index-item-description">Sets whether to force a surrounding block around the highlighted code or not</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_keyword_links</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_keyword_links">GeSHi::enable_keyword_links()</a> in geshi.php</div> - <div class="index-item-description">Turns linking of keywords on or off.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_line_numbers</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_line_numbers">GeSHi::enable_line_numbers()</a> in geshi.php</div> - <div class="index-item-description">Sets whether line numbers should be displayed.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_multiline_span</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_multiline_span">GeSHi::enable_multiline_span()</a> in geshi.php</div> - <div class="index-item-description">Sets wether spans and other HTML markup generated by GeSHi can span over multiple lines or not. Defaults to true to reduce overhead.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_strict_mode</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_strict_mode">GeSHi::enable_strict_mode()</a> in geshi.php</div> - <div class="index-item-description">Enables/disables strict highlighting. Default is off, calling this method without parameters will turn it on. See documentation for more details on strict mode and where to use it.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">error</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methoderror">GeSHi::error()</a> in geshi.php</div> - <div class="index-item-description">Returns an error message associated with the last GeSHi operation, or false if no error has occurred</div> - </dd> - </dl> - <a name="g"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">g</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Constructor.png" alt="Method" title="Method" /></title> - <span class="method-title">GeSHi</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodGeSHi">GeSHi::GeSHi()</a> in geshi.php</div> - <div class="index-item-description">Creates a new GeSHi object, with source and language</div> - </dd> - <dt class="field"> - <img src="media/images/Class.png" alt="Class" title="Class" /></title> - GeSHi - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html">GeSHi</a> in geshi.php</div> - <div class="index-item-description">The GeSHi Class.</div> - </dd> - <dt class="field"> - <img src="media/images/Page.png" alt="Page" title="Page" /></title> - <span class="include-title">geshi.php</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html">geshi.php</a> in geshi.php</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_ACTIVE</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_ACTIVE">GESHI_ACTIVE</a> in geshi.php</div> - <div class="index-item-description">Links in the source in the :active state</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_CAPS_LOWER</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_CAPS_LOWER">GESHI_CAPS_LOWER</a> in geshi.php</div> - <div class="index-item-description">Leave keywords found as the case that they are</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_CAPS_NO_CHANGE</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_CAPS_NO_CHANGE">GESHI_CAPS_NO_CHANGE</a> in geshi.php</div> - <div class="index-item-description">Lowercase keywords found</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_CAPS_UPPER</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_CAPS_UPPER">GESHI_CAPS_UPPER</a> in geshi.php</div> - <div class="index-item-description">Uppercase keywords found</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_END_IMPORTANT</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_END_IMPORTANT">GESHI_END_IMPORTANT</a> in geshi.php</div> - <div class="index-item-description">The ender for important parts of the source</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_FANCY_LINE_NUMBERS</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_FANCY_LINE_NUMBERS">GESHI_FANCY_LINE_NUMBERS</a> in geshi.php</div> - <div class="index-item-description">Use fancy line numbers when building the result</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_HEADER_DIV</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_HEADER_DIV">GESHI_HEADER_DIV</a> in geshi.php</div> - <div class="index-item-description">Use a "div" to surround the source</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_HEADER_NONE</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_HEADER_NONE">GESHI_HEADER_NONE</a> in geshi.php</div> - <div class="index-item-description">Use nothing to surround the source</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_HEADER_PRE</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE">GESHI_HEADER_PRE</a> in geshi.php</div> - <div class="index-item-description">Use a "pre" to surround the source</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_HEADER_PRE_TABLE</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_TABLE">GESHI_HEADER_PRE_TABLE</a> in geshi.php</div> - <div class="index-item-description">Use a "table" to surround the source:</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_HEADER_PRE_VALID</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_VALID">GESHI_HEADER_PRE_VALID</a> in geshi.php</div> - <div class="index-item-description">Use a pre to wrap lines when line numbers are enabled or to wrap the whole code.</div> - </dd> - <dt class="field"> - <img src="media/images/Function.png" alt="Function" title="Function" /></title> - <span class="method-title">geshi_highlight</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#functiongeshi_highlight">geshi_highlight()</a> in geshi.php</div> - <div class="index-item-description">Easy way to highlight stuff. Behaves just like highlight_string</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_HOVER</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_HOVER">GESHI_HOVER</a> in geshi.php</div> - <div class="index-item-description">Links in the source in the :hover state</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_LANG_ROOT</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_LANG_ROOT">GESHI_LANG_ROOT</a> in geshi.php</div> - <div class="index-item-description">The language file directory for GeSHi</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_LINK</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_LINK">GESHI_LINK</a> in geshi.php</div> - <div class="index-item-description">Links in the source in the :link state</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_NORMAL_LINE_NUMBERS</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_NORMAL_LINE_NUMBERS">GESHI_NORMAL_LINE_NUMBERS</a> in geshi.php</div> - <div class="index-item-description">Use normal line numbers when building the result</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_NO_LINE_NUMBERS</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a> in geshi.php</div> - <div class="index-item-description">Use no line numbers when building the result</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_ROOT</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_ROOT">GESHI_ROOT</a> in geshi.php</div> - <div class="index-item-description">The root directory for GeSHi</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_SECURITY_PARANOID</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_SECURITY_PARANOID">GESHI_SECURITY_PARANOID</a> in geshi.php</div> - <div class="index-item-description">Tells GeSHi to be paranoid about security settings</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_START_IMPORTANT</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_START_IMPORTANT">GESHI_START_IMPORTANT</a> in geshi.php</div> - <div class="index-item-description">The starter for important parts of the source</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_VERSION</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_VERSION">GESHI_VERSION</a> in geshi.php</div> - <div class="index-item-description">The version of this GeSHi file</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_VISITED</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_VISITED">GESHI_VISITED</a> in geshi.php</div> - <div class="index-item-description">Links in the source in the :visited state</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">get_language_name</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodget_language_name">GeSHi::get_language_name()</a> in geshi.php</div> - <div class="index-item-description">Gets a human-readable language name (thanks to Simon Patterson for the idea :))</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">get_language_name_from_extension</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodget_language_name_from_extension">GeSHi::get_language_name_from_extension()</a> in geshi.php</div> - <div class="index-item-description">Given a file extension, this method returns either a valid geshi language name, or the empty string if it couldn't be found</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">get_multiline_span</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodget_multiline_span">GeSHi::get_multiline_span()</a> in geshi.php</div> - <div class="index-item-description">Get current setting for multiline spans, see GeSHi->enable_multiline_span().</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">get_real_tab_width</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodget_real_tab_width">GeSHi::get_real_tab_width()</a> in geshi.php</div> - <div class="index-item-description">Returns the tab width to use, based on the current language and user preference</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">get_stylesheet</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodget_stylesheet">GeSHi::get_stylesheet()</a> in geshi.php</div> - <div class="index-item-description">Returns a stylesheet for the highlighted code. If $economy mode is true, we only return the stylesheet declarations that matter for this code block instead of the whole thing</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">get_time</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodget_time">GeSHi::get_time()</a> in geshi.php</div> - <div class="index-item-description">Gets the time taken to parse the code</div> - </dd> - </dl> - <a name="h"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">h</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">highlight_lines_extra</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodhighlight_lines_extra">GeSHi::highlight_lines_extra()</a> in geshi.php</div> - <div class="index-item-description">Specifies which lines to highlight extra</div> - </dd> - </dl> - <a name="l"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">l</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">load_from_file</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodload_from_file">GeSHi::load_from_file()</a> in geshi.php</div> - <div class="index-item-description">Given a file name, this method loads its contents in, and attempts</div> - </dd> - </dl> - <a name="o"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">o</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">optimize_keyword_group</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodoptimize_keyword_group">GeSHi::optimize_keyword_group()</a> in geshi.php</div> - <div class="index-item-description">compile optimized regexp list for keyword group</div> - </dd> - </dl> - <a name="p"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">p</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">parse_code</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodparse_code">GeSHi::parse_code()</a> in geshi.php</div> - <div class="index-item-description">Returns the code in $this->source, highlighted and surrounded by the nessecary HTML.</div> - </dd> - </dl> - <a name="r"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">r</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">remove_keyword</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodremove_keyword">GeSHi::remove_keyword()</a> in geshi.php</div> - <div class="index-item-description">Removes a keyword from a keyword group</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">remove_keyword_group</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodremove_keyword_group">GeSHi::remove_keyword_group()</a> in geshi.php</div> - <div class="index-item-description">Removes a keyword group</div> - </dd> - </dl> - <a name="s"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">s</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_brackets_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_brackets_highlighting">GeSHi::set_brackets_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for brackets</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_brackets_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_brackets_style">GeSHi::set_brackets_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for brackets. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_case_keywords</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_case_keywords">GeSHi::set_case_keywords()</a> in geshi.php</div> - <div class="index-item-description">Sets the case that keywords should use when found. Use the constants:</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_case_sensitivity</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_case_sensitivity">GeSHi::set_case_sensitivity()</a> in geshi.php</div> - <div class="index-item-description">Sets whether a set of keywords are checked for in a case sensitive manner</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_code_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_code_style">GeSHi::set_code_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the style for the actual code. This should be a string</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_comments_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_comments_highlighting">GeSHi::set_comments_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for comment groups</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_comments_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_comments_style">GeSHi::set_comments_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for comment groups. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_encoding</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_encoding">GeSHi::set_encoding()</a> in geshi.php</div> - <div class="index-item-description">Sets the encoding used for htmlspecialchars(), for international support.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_escape_characters_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_escape_characters_highlighting">GeSHi::set_escape_characters_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for escaped characters</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_escape_characters_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_escape_characters_style">GeSHi::set_escape_characters_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for escaped characters. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_footer_content</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_footer_content">GeSHi::set_footer_content()</a> in geshi.php</div> - <div class="index-item-description">Sets the content of the footer block</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_footer_content_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_footer_content_style">GeSHi::set_footer_content_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the style for the footer content</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_header_content</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_header_content">GeSHi::set_header_content()</a> in geshi.php</div> - <div class="index-item-description">Sets the content of the header block</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_header_content_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_header_content_style">GeSHi::set_header_content_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the style for the header content</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_header_type</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_header_type">GeSHi::set_header_type()</a> in geshi.php</div> - <div class="index-item-description">Sets the type of header to be used.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_highlight_lines_extra_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_highlight_lines_extra_style">GeSHi::set_highlight_lines_extra_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the style for extra-highlighted lines</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_important_styles</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_important_styles">GeSHi::set_important_styles()</a> in geshi.php</div> - <div class="index-item-description">Sets styles for important parts of the code</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_keyword_group_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_keyword_group_highlighting">GeSHi::set_keyword_group_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for a keyword group</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_keyword_group_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_keyword_group_style">GeSHi::set_keyword_group_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the style for a keyword group. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_language</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_language">GeSHi::set_language()</a> in geshi.php</div> - <div class="index-item-description">Sets the language for this object</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_language_path</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_language_path">GeSHi::set_language_path()</a> in geshi.php</div> - <div class="index-item-description">Sets the path to the directory containing the language files. Note that this path is relative to the directory of the script that included geshi.php, NOT geshi.php itself.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_line_ending</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_line_ending">GeSHi::set_line_ending()</a> in geshi.php</div> - <div class="index-item-description">Sets the line-ending</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_line_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_line_style">GeSHi::set_line_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for the line numbers.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_link_styles</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_link_styles">GeSHi::set_link_styles()</a> in geshi.php</div> - <div class="index-item-description">Sets styles for links in code</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_link_target</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_link_target">GeSHi::set_link_target()</a> in geshi.php</div> - <div class="index-item-description">Sets the target for links in code</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_methods_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_methods_highlighting">GeSHi::set_methods_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for methods</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_methods_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_methods_style">GeSHi::set_methods_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for methods. $key is a number that references the</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_numbers_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_numbers_highlighting">GeSHi::set_numbers_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for numbers</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_numbers_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_numbers_style">GeSHi::set_numbers_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for numbers. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_overall_class</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_overall_class">GeSHi::set_overall_class()</a> in geshi.php</div> - <div class="index-item-description">Sets the overall classname for this block of code. This class can then be used in a stylesheet to style this object's output</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_overall_id</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_overall_id">GeSHi::set_overall_id()</a> in geshi.php</div> - <div class="index-item-description">Sets the overall id for this block of code. This id can then be used in a stylesheet to style this object's output</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_overall_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_overall_style">GeSHi::set_overall_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for the code that will be outputted when this object is parsed. The style should be a string of valid stylesheet declarations</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_regexps_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_regexps_highlighting">GeSHi::set_regexps_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for regexps</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_regexps_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_regexps_style">GeSHi::set_regexps_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for regexps. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_source</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_source">GeSHi::set_source()</a> in geshi.php</div> - <div class="index-item-description">Sets the source code for this object</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_strings_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_strings_highlighting">GeSHi::set_strings_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for strings</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_strings_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_strings_style">GeSHi::set_strings_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for strings. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_symbols_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_symbols_highlighting">GeSHi::set_symbols_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for symbols</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_symbols_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_symbols_style">GeSHi::set_symbols_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for symbols. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_tab_width</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_tab_width">GeSHi::set_tab_width()</a> in geshi.php</div> - <div class="index-item-description">Sets how many spaces a tab is substituted for</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_url_for_keyword_group</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_url_for_keyword_group">GeSHi::set_url_for_keyword_group()</a> in geshi.php</div> - <div class="index-item-description">Sets the base URL to be used for keywords</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_use_language_tab_width</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_use_language_tab_width">GeSHi::set_use_language_tab_width()</a> in geshi.php</div> - <div class="index-item-description">Sets whether or not to use tab-stop width specifed by language</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">start_line_numbers_at</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodstart_line_numbers_at">GeSHi::start_line_numbers_at()</a> in geshi.php</div> - <div class="index-item-description">Sets what number line numbers should start at. Should be a positive integer, and will be converted to one.</div> - </dd> - </dl> - -<div class="index-letter-menu"> - <a class="index-letter" href="elementindex.html#a">a</a> - <a class="index-letter" href="elementindex.html#d">d</a> - <a class="index-letter" href="elementindex.html#e">e</a> - <a class="index-letter" href="elementindex.html#g">g</a> - <a class="index-letter" href="elementindex.html#h">h</a> - <a class="index-letter" href="elementindex.html#l">l</a> - <a class="index-letter" href="elementindex.html#o">o</a> - <a class="index-letter" href="elementindex.html#p">p</a> - <a class="index-letter" href="elementindex.html#r">r</a> - <a class="index-letter" href="elementindex.html#s">s</a> -</div> </body> -</html>
\ No newline at end of file diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/elementindex_geshi.html b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/elementindex_geshi.html deleted file mode 100644 index c3403081..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/elementindex_geshi.html +++ /dev/null @@ -1,864 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <!-- template designed by Marco Von Ballmoos --> - <title></title> - <link rel="stylesheet" href="media/stylesheet.css" /> - <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> - </head> - <body> - <a name="top"></a> -<h2>[geshi] element index</h2> -<a href="elementindex.html">All elements</a> -<br /> -<div class="index-letter-menu"> - <a class="index-letter" href="elementindex_geshi.html#a">a</a> - <a class="index-letter" href="elementindex_geshi.html#d">d</a> - <a class="index-letter" href="elementindex_geshi.html#e">e</a> - <a class="index-letter" href="elementindex_geshi.html#g">g</a> - <a class="index-letter" href="elementindex_geshi.html#h">h</a> - <a class="index-letter" href="elementindex_geshi.html#l">l</a> - <a class="index-letter" href="elementindex_geshi.html#o">o</a> - <a class="index-letter" href="elementindex_geshi.html#p">p</a> - <a class="index-letter" href="elementindex_geshi.html#r">r</a> - <a class="index-letter" href="elementindex_geshi.html#s">s</a> -</div> - - <a name="a"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">a</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">add_keyword</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodadd_keyword">GeSHi::add_keyword()</a> in geshi.php</div> - <div class="index-item-description">Adds a keyword to a keyword group for highlighting</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">add_keyword_group</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodadd_keyword_group">GeSHi::add_keyword_group()</a> in geshi.php</div> - <div class="index-item-description">Creates a new keyword group</div> - </dd> - </dl> - <a name="d"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">d</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">disable_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methoddisable_highlighting">GeSHi::disable_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Disables all highlighting</div> - </dd> - </dl> - <a name="e"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">e</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_classes</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_classes">GeSHi::enable_classes()</a> in geshi.php</div> - <div class="index-item-description">Sets whether CSS classes should be used to highlight the source. Default is off, calling this method with no arguments will turn it on</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_highlighting">GeSHi::enable_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Enables all highlighting</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_ids</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_ids">GeSHi::enable_ids()</a> in geshi.php</div> - <div class="index-item-description">Whether CSS IDs should be added to each line</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_important_blocks</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_important_blocks">GeSHi::enable_important_blocks()</a> in geshi.php</div> - <div class="index-item-description">Sets whether context-important blocks are highlighted</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_inner_code_block</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_inner_code_block">GeSHi::enable_inner_code_block()</a> in geshi.php</div> - <div class="index-item-description">Sets whether to force a surrounding block around the highlighted code or not</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_keyword_links</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_keyword_links">GeSHi::enable_keyword_links()</a> in geshi.php</div> - <div class="index-item-description">Turns linking of keywords on or off.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_line_numbers</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_line_numbers">GeSHi::enable_line_numbers()</a> in geshi.php</div> - <div class="index-item-description">Sets whether line numbers should be displayed.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_multiline_span</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_multiline_span">GeSHi::enable_multiline_span()</a> in geshi.php</div> - <div class="index-item-description">Sets wether spans and other HTML markup generated by GeSHi can span over multiple lines or not. Defaults to true to reduce overhead.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">enable_strict_mode</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodenable_strict_mode">GeSHi::enable_strict_mode()</a> in geshi.php</div> - <div class="index-item-description">Enables/disables strict highlighting. Default is off, calling this method without parameters will turn it on. See documentation for more details on strict mode and where to use it.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">error</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methoderror">GeSHi::error()</a> in geshi.php</div> - <div class="index-item-description">Returns an error message associated with the last GeSHi operation, or false if no error has occurred</div> - </dd> - </dl> - <a name="g"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">g</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Constructor.png" alt="Method" title="Method" /></title> - <span class="method-title">GeSHi</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodGeSHi">GeSHi::GeSHi()</a> in geshi.php</div> - <div class="index-item-description">Creates a new GeSHi object, with source and language</div> - </dd> - <dt class="field"> - <img src="media/images/Class.png" alt="Class" title="Class" /></title> - GeSHi - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html">GeSHi</a> in geshi.php</div> - <div class="index-item-description">The GeSHi Class.</div> - </dd> - <dt class="field"> - <img src="media/images/Page.png" alt="Page" title="Page" /></title> - <span class="include-title">geshi.php</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html">geshi.php</a> in geshi.php</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_ACTIVE</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_ACTIVE">GESHI_ACTIVE</a> in geshi.php</div> - <div class="index-item-description">Links in the source in the :active state</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_CAPS_LOWER</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_CAPS_LOWER">GESHI_CAPS_LOWER</a> in geshi.php</div> - <div class="index-item-description">Leave keywords found as the case that they are</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_CAPS_NO_CHANGE</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_CAPS_NO_CHANGE">GESHI_CAPS_NO_CHANGE</a> in geshi.php</div> - <div class="index-item-description">Lowercase keywords found</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_CAPS_UPPER</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_CAPS_UPPER">GESHI_CAPS_UPPER</a> in geshi.php</div> - <div class="index-item-description">Uppercase keywords found</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_END_IMPORTANT</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_END_IMPORTANT">GESHI_END_IMPORTANT</a> in geshi.php</div> - <div class="index-item-description">The ender for important parts of the source</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_FANCY_LINE_NUMBERS</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_FANCY_LINE_NUMBERS">GESHI_FANCY_LINE_NUMBERS</a> in geshi.php</div> - <div class="index-item-description">Use fancy line numbers when building the result</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_HEADER_DIV</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_HEADER_DIV">GESHI_HEADER_DIV</a> in geshi.php</div> - <div class="index-item-description">Use a "div" to surround the source</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_HEADER_NONE</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_HEADER_NONE">GESHI_HEADER_NONE</a> in geshi.php</div> - <div class="index-item-description">Use nothing to surround the source</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_HEADER_PRE</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE">GESHI_HEADER_PRE</a> in geshi.php</div> - <div class="index-item-description">Use a "pre" to surround the source</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_HEADER_PRE_TABLE</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_TABLE">GESHI_HEADER_PRE_TABLE</a> in geshi.php</div> - <div class="index-item-description">Use a "table" to surround the source:</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_HEADER_PRE_VALID</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_HEADER_PRE_VALID">GESHI_HEADER_PRE_VALID</a> in geshi.php</div> - <div class="index-item-description">Use a pre to wrap lines when line numbers are enabled or to wrap the whole code.</div> - </dd> - <dt class="field"> - <img src="media/images/Function.png" alt="Function" title="Function" /></title> - <span class="method-title">geshi_highlight</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#functiongeshi_highlight">geshi_highlight()</a> in geshi.php</div> - <div class="index-item-description">Easy way to highlight stuff. Behaves just like highlight_string</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_HOVER</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_HOVER">GESHI_HOVER</a> in geshi.php</div> - <div class="index-item-description">Links in the source in the :hover state</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_LANG_ROOT</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_LANG_ROOT">GESHI_LANG_ROOT</a> in geshi.php</div> - <div class="index-item-description">The language file directory for GeSHi</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_LINK</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_LINK">GESHI_LINK</a> in geshi.php</div> - <div class="index-item-description">Links in the source in the :link state</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_NORMAL_LINE_NUMBERS</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_NORMAL_LINE_NUMBERS">GESHI_NORMAL_LINE_NUMBERS</a> in geshi.php</div> - <div class="index-item-description">Use normal line numbers when building the result</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_NO_LINE_NUMBERS</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_NO_LINE_NUMBERS">GESHI_NO_LINE_NUMBERS</a> in geshi.php</div> - <div class="index-item-description">Use no line numbers when building the result</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_ROOT</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_ROOT">GESHI_ROOT</a> in geshi.php</div> - <div class="index-item-description">The root directory for GeSHi</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_SECURITY_PARANOID</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_SECURITY_PARANOID">GESHI_SECURITY_PARANOID</a> in geshi.php</div> - <div class="index-item-description">Tells GeSHi to be paranoid about security settings</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_START_IMPORTANT</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_START_IMPORTANT">GESHI_START_IMPORTANT</a> in geshi.php</div> - <div class="index-item-description">The starter for important parts of the source</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_VERSION</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_VERSION">GESHI_VERSION</a> in geshi.php</div> - <div class="index-item-description">The version of this GeSHi file</div> - </dd> - <dt class="field"> - <img src="media/images/Constant.png" alt="Constant" title="Constant" /></title> - <span class="const-title">GESHI_VISITED</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/_geshi.php.html#defineGESHI_VISITED">GESHI_VISITED</a> in geshi.php</div> - <div class="index-item-description">Links in the source in the :visited state</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">get_language_name</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodget_language_name">GeSHi::get_language_name()</a> in geshi.php</div> - <div class="index-item-description">Gets a human-readable language name (thanks to Simon Patterson for the idea :))</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">get_language_name_from_extension</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodget_language_name_from_extension">GeSHi::get_language_name_from_extension()</a> in geshi.php</div> - <div class="index-item-description">Given a file extension, this method returns either a valid geshi language name, or the empty string if it couldn't be found</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">get_multiline_span</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodget_multiline_span">GeSHi::get_multiline_span()</a> in geshi.php</div> - <div class="index-item-description">Get current setting for multiline spans, see GeSHi->enable_multiline_span().</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">get_real_tab_width</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodget_real_tab_width">GeSHi::get_real_tab_width()</a> in geshi.php</div> - <div class="index-item-description">Returns the tab width to use, based on the current language and user preference</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">get_stylesheet</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodget_stylesheet">GeSHi::get_stylesheet()</a> in geshi.php</div> - <div class="index-item-description">Returns a stylesheet for the highlighted code. If $economy mode is true, we only return the stylesheet declarations that matter for this code block instead of the whole thing</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">get_time</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodget_time">GeSHi::get_time()</a> in geshi.php</div> - <div class="index-item-description">Gets the time taken to parse the code</div> - </dd> - </dl> - <a name="h"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">h</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">highlight_lines_extra</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodhighlight_lines_extra">GeSHi::highlight_lines_extra()</a> in geshi.php</div> - <div class="index-item-description">Specifies which lines to highlight extra</div> - </dd> - </dl> - <a name="l"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">l</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">load_from_file</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodload_from_file">GeSHi::load_from_file()</a> in geshi.php</div> - <div class="index-item-description">Given a file name, this method loads its contents in, and attempts</div> - </dd> - </dl> - <a name="o"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">o</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">optimize_keyword_group</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodoptimize_keyword_group">GeSHi::optimize_keyword_group()</a> in geshi.php</div> - <div class="index-item-description">compile optimized regexp list for keyword group</div> - </dd> - </dl> - <a name="p"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">p</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">parse_code</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodparse_code">GeSHi::parse_code()</a> in geshi.php</div> - <div class="index-item-description">Returns the code in $this->source, highlighted and surrounded by the nessecary HTML.</div> - </dd> - </dl> - <a name="r"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">r</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">remove_keyword</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodremove_keyword">GeSHi::remove_keyword()</a> in geshi.php</div> - <div class="index-item-description">Removes a keyword from a keyword group</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">remove_keyword_group</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodremove_keyword_group">GeSHi::remove_keyword_group()</a> in geshi.php</div> - <div class="index-item-description">Removes a keyword group</div> - </dd> - </dl> - <a name="s"></a> - <div class="index-letter-section"> - <div style="float: left" class="index-letter-title">s</div> - <div style="float: right"><a href="#top">top</a></div> - <div style="clear: both"></div> - </div> - <dl> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_brackets_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_brackets_highlighting">GeSHi::set_brackets_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for brackets</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_brackets_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_brackets_style">GeSHi::set_brackets_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for brackets. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_case_keywords</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_case_keywords">GeSHi::set_case_keywords()</a> in geshi.php</div> - <div class="index-item-description">Sets the case that keywords should use when found. Use the constants:</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_case_sensitivity</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_case_sensitivity">GeSHi::set_case_sensitivity()</a> in geshi.php</div> - <div class="index-item-description">Sets whether a set of keywords are checked for in a case sensitive manner</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_code_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_code_style">GeSHi::set_code_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the style for the actual code. This should be a string</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_comments_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_comments_highlighting">GeSHi::set_comments_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for comment groups</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_comments_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_comments_style">GeSHi::set_comments_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for comment groups. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_encoding</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_encoding">GeSHi::set_encoding()</a> in geshi.php</div> - <div class="index-item-description">Sets the encoding used for htmlspecialchars(), for international support.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_escape_characters_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_escape_characters_highlighting">GeSHi::set_escape_characters_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for escaped characters</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_escape_characters_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_escape_characters_style">GeSHi::set_escape_characters_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for escaped characters. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_footer_content</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_footer_content">GeSHi::set_footer_content()</a> in geshi.php</div> - <div class="index-item-description">Sets the content of the footer block</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_footer_content_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_footer_content_style">GeSHi::set_footer_content_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the style for the footer content</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_header_content</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_header_content">GeSHi::set_header_content()</a> in geshi.php</div> - <div class="index-item-description">Sets the content of the header block</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_header_content_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_header_content_style">GeSHi::set_header_content_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the style for the header content</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_header_type</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_header_type">GeSHi::set_header_type()</a> in geshi.php</div> - <div class="index-item-description">Sets the type of header to be used.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_highlight_lines_extra_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_highlight_lines_extra_style">GeSHi::set_highlight_lines_extra_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the style for extra-highlighted lines</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_important_styles</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_important_styles">GeSHi::set_important_styles()</a> in geshi.php</div> - <div class="index-item-description">Sets styles for important parts of the code</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_keyword_group_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_keyword_group_highlighting">GeSHi::set_keyword_group_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for a keyword group</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_keyword_group_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_keyword_group_style">GeSHi::set_keyword_group_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the style for a keyword group. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_language</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_language">GeSHi::set_language()</a> in geshi.php</div> - <div class="index-item-description">Sets the language for this object</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_language_path</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_language_path">GeSHi::set_language_path()</a> in geshi.php</div> - <div class="index-item-description">Sets the path to the directory containing the language files. Note that this path is relative to the directory of the script that included geshi.php, NOT geshi.php itself.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_line_ending</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_line_ending">GeSHi::set_line_ending()</a> in geshi.php</div> - <div class="index-item-description">Sets the line-ending</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_line_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_line_style">GeSHi::set_line_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for the line numbers.</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_link_styles</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_link_styles">GeSHi::set_link_styles()</a> in geshi.php</div> - <div class="index-item-description">Sets styles for links in code</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_link_target</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_link_target">GeSHi::set_link_target()</a> in geshi.php</div> - <div class="index-item-description">Sets the target for links in code</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_methods_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_methods_highlighting">GeSHi::set_methods_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for methods</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_methods_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_methods_style">GeSHi::set_methods_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for methods. $key is a number that references the</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_numbers_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_numbers_highlighting">GeSHi::set_numbers_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for numbers</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_numbers_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_numbers_style">GeSHi::set_numbers_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for numbers. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_overall_class</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_overall_class">GeSHi::set_overall_class()</a> in geshi.php</div> - <div class="index-item-description">Sets the overall classname for this block of code. This class can then be used in a stylesheet to style this object's output</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_overall_id</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_overall_id">GeSHi::set_overall_id()</a> in geshi.php</div> - <div class="index-item-description">Sets the overall id for this block of code. This id can then be used in a stylesheet to style this object's output</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_overall_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_overall_style">GeSHi::set_overall_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for the code that will be outputted when this object is parsed. The style should be a string of valid stylesheet declarations</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_regexps_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_regexps_highlighting">GeSHi::set_regexps_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for regexps</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_regexps_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_regexps_style">GeSHi::set_regexps_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for regexps. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_source</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_source">GeSHi::set_source()</a> in geshi.php</div> - <div class="index-item-description">Sets the source code for this object</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_strings_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_strings_highlighting">GeSHi::set_strings_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for strings</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_strings_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_strings_style">GeSHi::set_strings_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for strings. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_symbols_highlighting</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_symbols_highlighting">GeSHi::set_symbols_highlighting()</a> in geshi.php</div> - <div class="index-item-description">Turns highlighting on/off for symbols</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_symbols_style</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_symbols_style">GeSHi::set_symbols_style()</a> in geshi.php</div> - <div class="index-item-description">Sets the styles for symbols. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_tab_width</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_tab_width">GeSHi::set_tab_width()</a> in geshi.php</div> - <div class="index-item-description">Sets how many spaces a tab is substituted for</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_url_for_keyword_group</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_url_for_keyword_group">GeSHi::set_url_for_keyword_group()</a> in geshi.php</div> - <div class="index-item-description">Sets the base URL to be used for keywords</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">set_use_language_tab_width</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodset_use_language_tab_width">GeSHi::set_use_language_tab_width()</a> in geshi.php</div> - <div class="index-item-description">Sets whether or not to use tab-stop width specifed by language</div> - </dd> - <dt class="field"> - <img src="media/images/Method.png" alt="Method" title="Method" /></title> - <span class="method-title">start_line_numbers_at</span> - </dt> - <dd class="index-item-body"> - <div class="index-item-details"><a href="geshi/core/GeSHi.html#methodstart_line_numbers_at">GeSHi::start_line_numbers_at()</a> in geshi.php</div> - <div class="index-item-description">Sets what number line numbers should start at. Should be a positive integer, and will be converted to one.</div> - </dd> - </dl> - -<div class="index-letter-menu"> - <a class="index-letter" href="elementindex_geshi.html#a">a</a> - <a class="index-letter" href="elementindex_geshi.html#d">d</a> - <a class="index-letter" href="elementindex_geshi.html#e">e</a> - <a class="index-letter" href="elementindex_geshi.html#g">g</a> - <a class="index-letter" href="elementindex_geshi.html#h">h</a> - <a class="index-letter" href="elementindex_geshi.html#l">l</a> - <a class="index-letter" href="elementindex_geshi.html#o">o</a> - <a class="index-letter" href="elementindex_geshi.html#p">p</a> - <a class="index-letter" href="elementindex_geshi.html#r">r</a> - <a class="index-letter" href="elementindex_geshi.html#s">s</a> -</div> </body> -</html>
\ No newline at end of file diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/errors.html b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/errors.html deleted file mode 100644 index c917f038..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/errors.html +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <!-- template designed by Marco Von Ballmoos --> - <title>phpDocumentor Parser Errors and Warnings</title> - <link rel="stylesheet" href="media/stylesheet.css" /> - <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> - </head> - <body> - <a href="#Post-parsing">Post-parsing</a><br> -<a name="geshi.php"></a> -<h1>geshi.php</h1> -<h2>Errors:</h2><br> -<b>Error on line 569</b> - DocBlock has multiple @access tags, illegal. ignoring additional tag "@access private"<br> - <p class="notes" id="credit"> - Documentation generated on Thu, 25 Dec 2008 14:34:53 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a> - </p> - </body> -</html>
\ No newline at end of file diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/geshi/core/GeSHi.html b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/geshi/core/GeSHi.html deleted file mode 100644 index e80e3a1e..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/geshi/core/GeSHi.html +++ /dev/null @@ -1,2676 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <!-- template designed by Marco Von Ballmoos --> - <title>Docs For Class GeSHi</title> - <link rel="stylesheet" href="../../media/stylesheet.css" /> - <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> - </head> - <body> - <div class="page-body"> -<h2 class="class-name"><img src="../../media/images/Class_logo.png" - alt=" Class" - title=" Class" - style="vertical-align: middle"> GeSHi</h2> - -<a name="sec-description"></a> -<div class="info-box"> - <div class="info-box-title">Description</div> - <div class="nav-bar"> - <span class="disabled">Description</span> | - <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>) - - </div> - <div class="info-box-body"> - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">The GeSHi Class.</p> -<p class="description"><p>Please refer to the documentation for GeSHi 1.0.X that is available at http://qbnz.com/highlighter/documentation.php for more information about how to use this class.</p></p> - <ul class="tags"> - <li><span class="field">author:</span> Nigel McNie <<a href="mailto:nigel@geshi.org">nigel@geshi.org</a>>, Benny Baumann <BenBE@geshi.org></li> - <li><span class="field">copyright:</span> (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2014 Benny Baumann</li> - </ul> - <p class="notes"> - Located in <a class="field" href="_geshi.php.html">/geshi.php</a> (line <span class="field"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a253">253</a></span>) - </p> - - - <pre></pre> - - </div> -</div> - - - - - <a name="sec-method-summary"></a> - <div class="info-box"> - <div class="info-box-title">Method Summary</span></div> - <div class="nav-bar"> - <a href="#sec-description">Description</a> | - <span class="disabled">Methods</span> (<a href="#sec-methods">details</a>) - </div> - <div class="info-box-body"> - <div class="method-summary"> - <div class="method-definition"> - <img src="../../media/images/Constructor.png" alt=" "/> - <span class="method-result">GeSHi</span> - <a href="#GeSHi" title="details" class="method-name">GeSHi</a> - ([<span class="var-type">string</span> <span class="var-name">$source</span> = <span class="var-default">''</span>], [<span class="var-type">string</span> <span class="var-name">$language</span> = <span class="var-default">''</span>], [<span class="var-type">string</span> <span class="var-name">$path</span> = <span class="var-default">''</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#add_keyword" title="details" class="method-name">add_keyword</a> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$word</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#add_keyword_group" title="details" class="method-name">add_keyword_group</a> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$styles</span>, [<span class="var-type">boolean</span> <span class="var-name">$case_sensitive</span> = <span class="var-default">true</span>], [<span class="var-type">array</span> <span class="var-name">$words</span> = <span class="var-default">array()</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#disable_highlighting" title="details" class="method-name">disable_highlighting</a> - () - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#enable_classes" title="details" class="method-name">enable_classes</a> - ([<span class="var-type">boolean</span> <span class="var-name">$flag</span> = <span class="var-default">true</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#enable_highlighting" title="details" class="method-name">enable_highlighting</a> - ([<span class="var-type">boolean</span> <span class="var-name">$flag</span> = <span class="var-default">true</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#enable_ids" title="details" class="method-name">enable_ids</a> - ([<span class="var-type">boolean</span> <span class="var-name">$flag</span> = <span class="var-default">true</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#enable_important_blocks" title="details" class="method-name">enable_important_blocks</a> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#enable_inner_code_block" title="details" class="method-name">enable_inner_code_block</a> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#enable_keyword_links" title="details" class="method-name">enable_keyword_links</a> - ([<span class="var-type">boolean</span> <span class="var-name">$enable</span> = <span class="var-default">true</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#enable_line_numbers" title="details" class="method-name">enable_line_numbers</a> - (<span class="var-type">int</span> <span class="var-name">$flag</span>, [<span class="var-type">int</span> <span class="var-name">$nth_row</span> = <span class="var-default">5</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#enable_multiline_span" title="details" class="method-name">enable_multiline_span</a> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#enable_strict_mode" title="details" class="method-name">enable_strict_mode</a> - ([<span class="var-type">boolean</span> <span class="var-name">$mode</span> = <span class="var-default">true</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">string|false</span> - <a href="#error" title="details" class="method-name">error</a> - () - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">string</span> - <a href="#get_language_name" title="details" class="method-name">get_language_name</a> - () - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#get_language_name_from_extension" title="details" class="method-name">get_language_name_from_extension</a> - (<span class="var-type">string</span> <span class="var-name">$extension</span>, [<span class="var-type">array</span> <span class="var-name">$lookup</span> = <span class="var-default">array()</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">bool</span> - <a href="#get_multiline_span" title="details" class="method-name">get_multiline_span</a> - () - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">int</span> - <a href="#get_real_tab_width" title="details" class="method-name">get_real_tab_width</a> - () - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">string</span> - <a href="#get_stylesheet" title="details" class="method-name">get_stylesheet</a> - ([<span class="var-type">boolean</span> <span class="var-name">$economy_mode</span> = <span class="var-default">true</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">double</span> - <a href="#get_time" title="details" class="method-name">get_time</a> - () - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#highlight_lines_extra" title="details" class="method-name">highlight_lines_extra</a> - (<span class="var-type">mixed</span> <span class="var-name">$lines</span>, [<span class="var-type">string</span> <span class="var-name">$style</span> = <span class="var-default">null</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#load_from_file" title="details" class="method-name">load_from_file</a> - (<span class="var-type">string</span> <span class="var-name">$file_name</span>, [<span class="var-type">array</span> <span class="var-name">$lookup</span> = <span class="var-default">array()</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#optimize_keyword_group" title="details" class="method-name">optimize_keyword_group</a> - (<span class="var-type">int</span> <span class="var-name">$key</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#parse_code" title="details" class="method-name">parse_code</a> - () - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#remove_keyword" title="details" class="method-name">remove_keyword</a> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$word</span>, [<span class="var-type">bool</span> <span class="var-name">$recompile</span> = <span class="var-default">true</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#remove_keyword_group" title="details" class="method-name">remove_keyword_group</a> - (<span class="var-type">int</span> <span class="var-name">$key</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_brackets_highlighting" title="details" class="method-name">set_brackets_highlighting</a> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_brackets_style" title="details" class="method-name">set_brackets_style</a> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_case_keywords" title="details" class="method-name">set_case_keywords</a> - (<span class="var-type">int</span> <span class="var-name">$case</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_case_sensitivity" title="details" class="method-name">set_case_sensitivity</a> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">boolean</span> <span class="var-name">$case</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_code_style" title="details" class="method-name">set_code_style</a> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_comments_highlighting" title="details" class="method-name">set_comments_highlighting</a> - (<span class="var-type">int</span> <span class="var-name">$key</span>, [<span class="var-type">boolean</span> <span class="var-name">$flag</span> = <span class="var-default">true</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_comments_style" title="details" class="method-name">set_comments_style</a> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_encoding" title="details" class="method-name">set_encoding</a> - (<span class="var-type">string</span> <span class="var-name">$encoding</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_escape_characters_highlighting" title="details" class="method-name">set_escape_characters_highlighting</a> - ([<span class="var-type">boolean</span> <span class="var-name">$flag</span> = <span class="var-default">true</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_escape_characters_style" title="details" class="method-name">set_escape_characters_style</a> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_footer_content" title="details" class="method-name">set_footer_content</a> - (<span class="var-type">string</span> <span class="var-name">$content</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_footer_content_style" title="details" class="method-name">set_footer_content_style</a> - (<span class="var-type">string</span> <span class="var-name">$style</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_header_content" title="details" class="method-name">set_header_content</a> - (<span class="var-type">string</span> <span class="var-name">$content</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_header_content_style" title="details" class="method-name">set_header_content_style</a> - (<span class="var-type">string</span> <span class="var-name">$style</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_header_type" title="details" class="method-name">set_header_type</a> - (<span class="var-type">int</span> <span class="var-name">$type</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_highlight_lines_extra_style" title="details" class="method-name">set_highlight_lines_extra_style</a> - (<span class="var-type">string</span> <span class="var-name">$styles</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_important_styles" title="details" class="method-name">set_important_styles</a> - (<span class="var-type">string</span> <span class="var-name">$styles</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_keyword_group_highlighting" title="details" class="method-name">set_keyword_group_highlighting</a> - (<span class="var-type">int</span> <span class="var-name">$key</span>, [<span class="var-type">boolean</span> <span class="var-name">$flag</span> = <span class="var-default">true</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_keyword_group_style" title="details" class="method-name">set_keyword_group_style</a> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_language" title="details" class="method-name">set_language</a> - (<span class="var-type">string</span> <span class="var-name">$language</span>, [<span class="var-type"></span> <span class="var-name">$force_reset</span> = <span class="var-default">false</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_language_path" title="details" class="method-name">set_language_path</a> - (<span class="var-type">string</span> <span class="var-name">$path</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_line_ending" title="details" class="method-name">set_line_ending</a> - (<span class="var-type">string</span> <span class="var-name">$line_ending</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_line_style" title="details" class="method-name">set_line_style</a> - (<span class="var-type">string</span> <span class="var-name">$style1</span>, [<span class="var-type">string|boolean</span> <span class="var-name">$style2</span> = <span class="var-default">''</span>], [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_link_styles" title="details" class="method-name">set_link_styles</a> - (<span class="var-type">int</span> <span class="var-name">$type</span>, <span class="var-type">string</span> <span class="var-name">$styles</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_link_target" title="details" class="method-name">set_link_target</a> - (<span class="var-type">string</span> <span class="var-name">$target</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_methods_highlighting" title="details" class="method-name">set_methods_highlighting</a> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_methods_style" title="details" class="method-name">set_methods_style</a> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_numbers_highlighting" title="details" class="method-name">set_numbers_highlighting</a> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_numbers_style" title="details" class="method-name">set_numbers_style</a> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_overall_class" title="details" class="method-name">set_overall_class</a> - (<span class="var-type">string</span> <span class="var-name">$class</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_overall_id" title="details" class="method-name">set_overall_id</a> - (<span class="var-type">string</span> <span class="var-name">$id</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_overall_style" title="details" class="method-name">set_overall_style</a> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_regexps_highlighting" title="details" class="method-name">set_regexps_highlighting</a> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_regexps_style" title="details" class="method-name">set_regexps_style</a> - (<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">boolean</span> <span class="var-name">$style</span>, [<span class="var-type"></span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_source" title="details" class="method-name">set_source</a> - (<span class="var-type">string</span> <span class="var-name">$source</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_strings_highlighting" title="details" class="method-name">set_strings_highlighting</a> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_strings_style" title="details" class="method-name">set_strings_style</a> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_symbols_highlighting" title="details" class="method-name">set_symbols_highlighting</a> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_symbols_style" title="details" class="method-name">set_symbols_style</a> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>], [<span class="var-type">int</span> <span class="var-name">$group</span> = <span class="var-default">0</span>]) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_tab_width" title="details" class="method-name">set_tab_width</a> - (<span class="var-type">int</span> <span class="var-name">$width</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_url_for_keyword_group" title="details" class="method-name">set_url_for_keyword_group</a> - (<span class="var-type">int</span> <span class="var-name">$group</span>, <span class="var-type">string</span> <span class="var-name">$url</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#set_use_language_tab_width" title="details" class="method-name">set_use_language_tab_width</a> - (<span class="var-type">boolean</span> <span class="var-name">$use</span>) - </div> - <div class="method-definition"> - <img src="../../media/images/Method.png" alt=" "/> - <span class="method-result">void</span> - <a href="#start_line_numbers_at" title="details" class="method-name">start_line_numbers_at</a> - (<span class="var-type">int</span> <span class="var-name">$number</span>) - </div> - </div> - </div> - </div> - - - <a name="sec-methods"></a> - <div class="info-box"> - <div class="info-box-title">Methods</div> - <div class="nav-bar"> - <a href="#sec-description">Description</a> | - <a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>) - - </div> - <div class="info-box-body"> - <A NAME='method_detail'></A> -<a name="methodGeSHi" id="GeSHi"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Constructor.png" /> - <span class="method-title">Constructor GeSHi</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a591">591</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Creates a new GeSHi object, with source and language</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">GeSHi</span> - <span class="method-name"> - GeSHi - </span> - ([<span class="var-type">string</span> <span class="var-name">$source</span> = <span class="var-default">''</span>], [<span class="var-type">string</span> <span class="var-name">$language</span> = <span class="var-default">''</span>], [<span class="var-type">string</span> <span class="var-name">$path</span> = <span class="var-default">''</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$source</span><span class="var-description">: The source code to highlight</span> </li> - <li> - <span class="var-type">string</span> - <span class="var-name">$language</span><span class="var-description">: The language to highlight the source with</span> </li> - <li> - <span class="var-type">string</span> - <span class="var-name">$path</span><span class="var-description">: The path to the language file directory. <strong>This - is deprecated!</strong> I've backported the auto path detection from the 1.1.X dev branch, so now it should be automatically set correctly. If you have renamed the language directory however, you will still need to set the path using this parameter or GeSHi->set_language_path()</span> </li> - </ul> - - - </div> -<a name="methodadd_keyword" id="add_keyword"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">add_keyword</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1441">1441</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Adds a keyword to a keyword group for highlighting</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - add_keyword - </span> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$word</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$key</span><span class="var-description">: The key of the keyword group to add the keyword to</span> </li> - <li> - <span class="var-type">string</span> - <span class="var-name">$word</span><span class="var-description">: The word to add to the keyword group</span> </li> - </ul> - - - </div> -<a name="methodadd_keyword_group" id="add_keyword_group"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">add_keyword_group</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1487">1487</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Creates a new keyword group</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - add_keyword_group - </span> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$styles</span>, [<span class="var-type">boolean</span> <span class="var-name">$case_sensitive</span> = <span class="var-default">true</span>], [<span class="var-type">array</span> <span class="var-name">$words</span> = <span class="var-default">array()</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$key</span><span class="var-description">: The key of the keyword group to create</span> </li> - <li> - <span class="var-type">string</span> - <span class="var-name">$styles</span><span class="var-description">: The styles for the keyword group</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$case_sensitive</span><span class="var-description">: Whether the keyword group is case sensitive ornot</span> </li> - <li> - <span class="var-type">array</span> - <span class="var-name">$words</span><span class="var-description">: The words to use for the keyword group</span> </li> - </ul> - - - </div> -<a name="methoddisable_highlighting" id="disable_highlighting"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">disable_highlighting</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1288">1288</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Disables all highlighting</p> - <ul class="tags"> - <li><span class="field">deprecated:</span> In favour of enable_highlighting</li> - <li><span class="field">todo:</span> Rewrite with array traversal</li> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - disable_highlighting - </span> - () - </div> - - - - </div> -<a name="methodenable_classes" id="enable_classes"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">enable_classes</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a805">805</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets whether CSS classes should be used to highlight the source. Default is off, calling this method with no arguments will turn it on</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - enable_classes - </span> - ([<span class="var-type">boolean</span> <span class="var-name">$flag</span> = <span class="var-default">true</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: Whether to turn classes on or not</span> </li> - </ul> - - - </div> -<a name="methodenable_highlighting" id="enable_highlighting"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">enable_highlighting</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1302">1302</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Enables all highlighting</p> -<p class="description"><p>The optional flag parameter was added in version 1.0.7.21 and can be used to enable (true) or disable (false) all highlighting.</p></p> - <ul class="tags"> - <li><span class="field">todo:</span> Rewrite with array traversal</li> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - enable_highlighting - </span> - ([<span class="var-type">boolean</span> <span class="var-name">$flag</span> = <span class="var-default">true</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: A flag specifying whether to enable or disable all highlighting</span> </li> - </ul> - - - </div> -<a name="methodenable_ids" id="enable_ids"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">enable_ids</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1652">1652</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Whether CSS IDs should be added to each line</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - enable_ids - </span> - ([<span class="var-type">boolean</span> <span class="var-name">$flag</span> = <span class="var-default">true</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: If true, IDs will be added to each line.</span> </li> - </ul> - - - </div> -<a name="methodenable_important_blocks" id="enable_important_blocks"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">enable_important_blocks</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1642">1642</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets whether context-important blocks are highlighted</p> - <ul class="tags"> - <li><span class="field">deprecated:</span> </li> - <li><span class="field">todo:</span> REMOVE THIS SHIZ FROM GESHI!</li> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - enable_important_blocks - </span> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: Tells whether to enable or disable highlighting of important blocks</span> </li> - </ul> - - - </div> -<a name="methodenable_inner_code_block" id="enable_inner_code_block"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">enable_inner_code_block</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1581">1581</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets whether to force a surrounding block around the highlighted code or not</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.7.20</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - enable_inner_code_block - </span> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: Tells whether to enable or disable this feature</span> </li> - </ul> - - - </div> -<a name="methodenable_keyword_links" id="enable_keyword_links"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">enable_keyword_links</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1756">1756</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Turns linking of keywords on or off.</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - enable_keyword_links - </span> - ([<span class="var-type">boolean</span> <span class="var-name">$enable</span> = <span class="var-default">true</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$enable</span><span class="var-description">: If true, links will be added to keywords</span> </li> - </ul> - - - </div> -<a name="methodenable_line_numbers" id="enable_line_numbers"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">enable_line_numbers</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a878">878</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets whether line numbers should be displayed.</p> -<p class="description"><p>Valid values for the first parameter are:</p><p><ul><li>GESHI_NO_LINE_NUMBERS: Line numbers will not be displayed</li><li>GESHI_NORMAL_LINE_NUMBERS: Line numbers will be displayed</li><li>GESHI_FANCY_LINE_NUMBERS: Fancy line numbers will be displayed</li></ul> For fancy line numbers, the second parameter is used to signal which lines are to be fancy. For example, if the value of this parameter is 5 then every 5th line will be fancy.</p></p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - enable_line_numbers - </span> - (<span class="var-type">int</span> <span class="var-name">$flag</span>, [<span class="var-type">int</span> <span class="var-name">$nth_row</span> = <span class="var-default">5</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$flag</span><span class="var-description">: How line numbers should be displayed</span> </li> - <li> - <span class="var-type">int</span> - <span class="var-name">$nth_row</span><span class="var-description">: Defines which lines are fancy</span> </li> - </ul> - - - </div> -<a name="methodenable_multiline_span" id="enable_multiline_span"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">enable_multiline_span</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a896">896</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets wether spans and other HTML markup generated by GeSHi can span over multiple lines or not. Defaults to true to reduce overhead.</p> -<p class="description"><p>Set it to false if you want to manipulate the output or manually display the code in an ordered list.</p></p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.7.22</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - enable_multiline_span - </span> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: Wether multiline spans are allowed or not</span> </li> - </ul> - - - </div> -<a name="methodenable_strict_mode" id="enable_strict_mode"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">enable_strict_mode</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1275">1275</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Enables/disables strict highlighting. Default is off, calling this method without parameters will turn it on. See documentation for more details on strict mode and where to use it.</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - enable_strict_mode - </span> - ([<span class="var-type">boolean</span> <span class="var-name">$mode</span> = <span class="var-default">true</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$mode</span><span class="var-description">: Whether to enable strict mode or not</span> </li> - </ul> - - - </div> -<a name="methoderror" id="error"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">error</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a608">608</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Returns an error message associated with the last GeSHi operation, or false if no error has occurred</p> - <ul class="tags"> - <li><span class="field">return:</span> An error message if there has been an error, else false</li> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">string|false</span> - <span class="method-name"> - error - </span> - () - </div> - - - - </div> -<a name="methodget_language_name" id="get_language_name"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">get_language_name</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a632">632</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Gets a human-readable language name (thanks to Simon Patterson for the idea :))</p> - <ul class="tags"> - <li><span class="field">return:</span> The name for the current language</li> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">string</span> - <span class="method-name"> - get_language_name - </span> - () - </div> - - - - </div> -<a name="methodget_language_name_from_extension" id="get_language_name_from_extension"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">get_language_name_from_extension</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1329">1329</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Given a file extension, this method returns either a valid geshi language name, or the empty string if it couldn't be found</p> - <ul class="tags"> - <li><span class="field">todo:</span> Re-think about how this method works (maybe make it private and/or make it a extension->lang lookup?)</li> - <li><span class="field">todo:</span> static?</li> - <li><span class="field">since:</span> 1.0.5</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - get_language_name_from_extension - </span> - (<span class="var-type">string</span> <span class="var-name">$extension</span>, [<span class="var-type">array</span> <span class="var-name">$lookup</span> = <span class="var-default">array()</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$extension</span><span class="var-description">: The extension to get a language name for</span> </li> - <li> - <span class="var-type">array</span> - <span class="var-name">$lookup</span><span class="var-description">: A lookup array to use instead of the default one</span> </li> - </ul> - - - </div> -<a name="methodget_multiline_span" id="get_multiline_span"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">get_multiline_span</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a906">906</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Get current setting for multiline spans, see GeSHi->enable_multiline_span().</p> - <ul class="tags"> - <li><span class="field">see:</span> <a href="../../geshi/core/GeSHi.html#methodenable_multiline_span">GeSHi::enable_multiline_span()</a></li> - </ul> - - <div class="method-signature"> - <span class="method-result">bool</span> - <span class="method-name"> - get_multiline_span - </span> - () - </div> - - - - </div> -<a name="methodget_real_tab_width" id="get_real_tab_width"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">get_real_tab_width</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1258">1258</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Returns the tab width to use, based on the current language and user preference</p> - <ul class="tags"> - <li><span class="field">return:</span> Tab width</li> - <li><span class="field">since:</span> 1.0.7.20</li> - </ul> - - <div class="method-signature"> - <span class="method-result">int</span> - <span class="method-name"> - get_real_tab_width - </span> - () - </div> - - - - </div> -<a name="methodget_stylesheet" id="get_stylesheet"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">get_stylesheet</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a4177">4177</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Returns a stylesheet for the highlighted code. If $economy mode is true, we only return the stylesheet declarations that matter for this code block instead of the whole thing</p> - <ul class="tags"> - <li><span class="field">return:</span> A stylesheet built on the data for the current language</li> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">string</span> - <span class="method-name"> - get_stylesheet - </span> - ([<span class="var-type">boolean</span> <span class="var-name">$economy_mode</span> = <span class="var-default">true</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$economy_mode</span><span class="var-description">: Whether to use economy mode or not</span> </li> - </ul> - - - </div> -<a name="methodget_time" id="get_time"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">get_time</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a3524">3524</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Gets the time taken to parse the code</p> - <ul class="tags"> - <li><span class="field">return:</span> The time taken to parse the code</li> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">double</span> - <span class="method-name"> - get_time - </span> - () - </div> - - - - </div> -<a name="methodhighlight_lines_extra" id="highlight_lines_extra"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">highlight_lines_extra</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1670">1670</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Specifies which lines to highlight extra</p> -<p class="description"><p>The extra style parameter was added in 1.0.7.21.</p></p> - <ul class="tags"> - <li><span class="field">todo:</span> Some data replication here that could be cut down on</li> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - highlight_lines_extra - </span> - (<span class="var-type">mixed</span> <span class="var-name">$lines</span>, [<span class="var-type">string</span> <span class="var-name">$style</span> = <span class="var-default">null</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">mixed</span> - <span class="var-name">$lines</span><span class="var-description">: An array of line numbers to highlight, or just a line number on its own.</span> </li> - <li> - <span class="var-type">string</span> - <span class="var-name">$style</span><span class="var-description">: A string specifying the style to use for this line. If null is specified, the default style is used. If false is specified, the line will be removed from special highlighting</span> </li> - </ul> - - - </div> -<a name="methodload_from_file" id="load_from_file"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">load_from_file</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1425">1425</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Given a file name, this method loads its contents in, and attempts</p> -<p class="description"><p>to set the language automatically. An optional lookup table can be passed for looking up the language name. If not specified a default table is used</p><p>The language table is in the form <pre>array( - 'lang_name' => array('extension', 'extension', ...), - 'lang_name' ... - );</pre></p></p> - <ul class="tags"> - <li><span class="field">todo:</span> Complete rethink of this and above method</li> - <li><span class="field">since:</span> 1.0.5</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - load_from_file - </span> - (<span class="var-type">string</span> <span class="var-name">$file_name</span>, [<span class="var-type">array</span> <span class="var-name">$lookup</span> = <span class="var-default">array()</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$file_name</span><span class="var-description">: The filename to load the source from</span> </li> - <li> - <span class="var-type">array</span> - <span class="var-name">$lookup</span><span class="var-description">: A lookup array to use instead of the default one</span> </li> - </ul> - - - </div> -<a name="methodoptimize_keyword_group" id="optimize_keyword_group"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">optimize_keyword_group</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1529">1529</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">compile optimized regexp list for keyword group</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.8</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - optimize_keyword_group - </span> - (<span class="var-type">int</span> <span class="var-name">$key</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$key</span><span class="var-description">: The key of the keyword group to compile & optimize</span> </li> - </ul> - - - </div> -<a name="methodparse_code" id="parse_code"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">parse_code</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1992">1992</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Returns the code in $this->source, highlighted and surrounded by the nessecary HTML.</p> -<p class="description"><p>This should only be called ONCE, cos it's SLOW! If you want to highlight the same source multiple times, you're better off doing a whole lot of str_replaces to replace the &lt;span&gt;s</p></p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - parse_code - </span> - () - </div> - - - - </div> -<a name="methodremove_keyword" id="remove_keyword"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">remove_keyword</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1466">1466</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Removes a keyword from a keyword group</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - remove_keyword - </span> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$word</span>, [<span class="var-type">bool</span> <span class="var-name">$recompile</span> = <span class="var-default">true</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$key</span><span class="var-description">: The key of the keyword group to remove the keyword from</span> </li> - <li> - <span class="var-type">string</span> - <span class="var-name">$word</span><span class="var-description">: The word to remove from the keyword group</span> </li> - <li> - <span class="var-type">bool</span> - <span class="var-name">$recompile</span><span class="var-description">: Wether to automatically recompile the optimized regexp list or not. Note: if you set this to false and @see GeSHi->parse_code() was already called once, for the current language, you have to manually call @see GeSHi->optimize_keyword_group() or the removed keyword will stay in cache and still be highlighted! On the other hand it might be too expensive to recompile the regexp list for every removal if you want to remove a lot of keywords.</span> </li> - </ul> - - - </div> -<a name="methodremove_keyword_group" id="remove_keyword_group"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">remove_keyword_group</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1512">1512</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Removes a keyword group</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - remove_keyword_group - </span> - (<span class="var-type">int</span> <span class="var-name">$key</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$key</span><span class="var-description">: The key of the keyword group to remove</span> </li> - </ul> - - - </div> -<a name="methodset_brackets_highlighting" id="set_brackets_highlighting"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_brackets_highlighting</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1036">1036</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Turns highlighting on/off for brackets</p> -<p class="description"><p>This method is DEPRECATED: use set_symbols_highlighting instead. This method will be remove in 1.2.X</p></p> - <ul class="tags"> - <li><span class="field">deprecated:</span> In favour of set_symbols_highlighting</li> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_brackets_highlighting - </span> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: Whether to turn highlighting for brackets on or off</span> </li> - </ul> - - - </div> -<a name="methodset_brackets_style" id="set_brackets_style"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_brackets_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1018">1018</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the styles for brackets. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</p> -<p class="description"><p>This method is DEPRECATED: use set_symbols_style instead. This method will be removed in 1.2.X</p></p> - <ul class="tags"> - <li><span class="field">deprecated:</span> In favour of set_symbols_style</li> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_brackets_style - </span> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$style</span><span class="var-description">: The style to make the brackets</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$preserve_defaults</span><span class="var-description">: Whether to merge the new styles with the old or just to overwrite them</span> </li> - </ul> - - - </div> -<a name="methodset_case_keywords" id="set_case_keywords"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_case_keywords</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1216">1216</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the case that keywords should use when found. Use the constants:</p> -<p class="description"><p><ul><li>GESHI_CAPS_NO_CHANGE: leave keywords as-is</li><li>GESHI_CAPS_UPPER: convert all keywords to uppercase where found</li><li>GESHI_CAPS_LOWER: convert all keywords to lowercase where found</li></ul></p></p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.1</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_case_keywords - </span> - (<span class="var-type">int</span> <span class="var-name">$case</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$case</span><span class="var-description">: A constant specifying what to do with matched keywords</span> </li> - </ul> - - - </div> -<a name="methodset_case_sensitivity" id="set_case_sensitivity"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_case_sensitivity</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1202">1202</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets whether a set of keywords are checked for in a case sensitive manner</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_case_sensitivity - </span> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">boolean</span> <span class="var-name">$case</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$key</span><span class="var-description">: The key of the keyword group to change the case sensitivity of</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$case</span><span class="var-description">: Whether to check in a case sensitive manner or not</span> </li> - </ul> - - - </div> -<a name="methodset_code_style" id="set_code_style"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_code_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a824">824</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the style for the actual code. This should be a string</p> -<p class="description"><p>containing valid stylesheet declarations. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</p><p>Note: Use this method to override any style changes you made to the line numbers if you are using line numbers, else the line of code will have the same style as the line number! Consult the GeSHi documentation for more information about this.</p></p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_code_style - </span> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$style</span><span class="var-description">: The style to use for actual code</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$preserve_defaults</span><span class="var-description">: Whether to merge the current styles with the new styles</span> </li> - </ul> - - - </div> -<a name="methodset_comments_highlighting" id="set_comments_highlighting"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_comments_highlighting</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a972">972</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Turns highlighting on/off for comment groups</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_comments_highlighting - </span> - (<span class="var-type">int</span> <span class="var-name">$key</span>, [<span class="var-type">boolean</span> <span class="var-name">$flag</span> = <span class="var-default">true</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$key</span><span class="var-description">: The key of the comment group to turn on or off</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: Whether to turn highlighting for that group on or off</span> </li> - </ul> - - - </div> -<a name="methodset_comments_style" id="set_comments_style"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_comments_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a957">957</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the styles for comment groups. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_comments_style - </span> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$key</span><span class="var-description">: The key of the comment group to change the styles of</span> </li> - <li> - <span class="var-type">string</span> - <span class="var-name">$style</span><span class="var-description">: The style to make the comments</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$preserve_defaults</span><span class="var-description">: Whether to merge the new styles with the old or just to overwrite them</span> </li> - </ul> - - - </div> -<a name="methodset_encoding" id="set_encoding"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_encoding</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1744">1744</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the encoding used for htmlspecialchars(), for international support.</p> -<p class="description"><p>NOTE: This is not needed for now because htmlspecialchars() is not being used (it has a security hole in PHP4 that has not been patched). Maybe in a future version it may make a return for speed reasons, but I doubt it.</p></p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.3</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_encoding - </span> - (<span class="var-type">string</span> <span class="var-name">$encoding</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$encoding</span><span class="var-description">: The encoding to use for the source</span> </li> - </ul> - - - </div> -<a name="methodset_escape_characters_highlighting" id="set_escape_characters_highlighting"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_escape_characters_highlighting</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1000">1000</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Turns highlighting on/off for escaped characters</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_escape_characters_highlighting - </span> - ([<span class="var-type">boolean</span> <span class="var-name">$flag</span> = <span class="var-default">true</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: Whether to turn highlighting for escape characters on or off</span> </li> - </ul> - - - </div> -<a name="methodset_escape_characters_style" id="set_escape_characters_style"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_escape_characters_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a986">986</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the styles for escaped characters. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_escape_characters_style - </span> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$style</span><span class="var-description">: The style to make the escape characters</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$preserve_defaults</span><span class="var-description">: Whether to merge the new styles with the old or just to overwrite them</span> </li> - </ul> - - - </div> -<a name="methodset_footer_content" id="set_footer_content"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_footer_content</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1550">1550</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the content of the footer block</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_footer_content - </span> - (<span class="var-type">string</span> <span class="var-name">$content</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$content</span><span class="var-description">: The content of the footer block</span> </li> - </ul> - - - </div> -<a name="methodset_footer_content_style" id="set_footer_content_style"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_footer_content_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1570">1570</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the style for the footer content</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_footer_content_style - </span> - (<span class="var-type">string</span> <span class="var-name">$style</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$style</span><span class="var-description">: The style for the footer content</span> </li> - </ul> - - - </div> -<a name="methodset_header_content" id="set_header_content"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_header_content</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1540">1540</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the content of the header block</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_header_content - </span> - (<span class="var-type">string</span> <span class="var-name">$content</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$content</span><span class="var-description">: The content of the header block</span> </li> - </ul> - - - </div> -<a name="methodset_header_content_style" id="set_header_content_style"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_header_content_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1560">1560</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the style for the header content</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_header_content_style - </span> - (<span class="var-type">string</span> <span class="var-name">$style</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$style</span><span class="var-description">: The style for the header content</span> </li> - </ul> - - - </div> -<a name="methodset_header_type" id="set_header_type"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_header_type</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a746">746</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the type of header to be used.</p> -<p class="description"><p>If GESHI_HEADER_DIV is used, the code is surrounded in a "div".This means more source code but more control over tab width and line-wrapping. GESHI_HEADER_PRE means that a "pre" is used - less source, but less control. Default is GESHI_HEADER_PRE.</p><p>From 1.0.7.2, you can use GESHI_HEADER_NONE to specify that no header code should be outputted.</p></p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_header_type - </span> - (<span class="var-type">int</span> <span class="var-name">$type</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$type</span><span class="var-description">: The type of header to be used</span> </li> - </ul> - - - </div> -<a name="methodset_highlight_lines_extra_style" id="set_highlight_lines_extra_style"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_highlight_lines_extra_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1699">1699</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the style for extra-highlighted lines</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_highlight_lines_extra_style - </span> - (<span class="var-type">string</span> <span class="var-name">$styles</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$styles</span><span class="var-description">: The style for extra-highlighted lines</span> </li> - </ul> - - - </div> -<a name="methodset_important_styles" id="set_important_styles"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_important_styles</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1630">1630</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets styles for important parts of the code</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_important_styles - </span> - (<span class="var-type">string</span> <span class="var-name">$styles</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$styles</span><span class="var-description">: The styles to use on important parts of the code</span> </li> - </ul> - - - </div> -<a name="methodset_keyword_group_highlighting" id="set_keyword_group_highlighting"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_keyword_group_highlighting</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a942">942</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Turns highlighting on/off for a keyword group</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_keyword_group_highlighting - </span> - (<span class="var-type">int</span> <span class="var-name">$key</span>, [<span class="var-type">boolean</span> <span class="var-name">$flag</span> = <span class="var-default">true</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$key</span><span class="var-description">: The key of the keyword group to turn on or off</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: Whether to turn highlighting for that group on or off</span> </li> - </ul> - - - </div> -<a name="methodset_keyword_group_style" id="set_keyword_group_style"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_keyword_group_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a921">921</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the style for a keyword group. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_keyword_group_style - </span> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$key</span><span class="var-description">: The key of the keyword group to change the styles of</span> </li> - <li> - <span class="var-type">string</span> - <span class="var-name">$style</span><span class="var-description">: The style to make the keywords</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$preserve_defaults</span><span class="var-description">: Whether to merge the new styles with the old or just to overwrite them</span> </li> - </ul> - - - </div> -<a name="methodset_language" id="set_language"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_language</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a659">659</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the language for this object</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - <li><span class="field">note:</span> since 1.0.8 this function won't reset language-settings by default anymore! if you need this set $force_reset = true</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_language - </span> - (<span class="var-type">string</span> <span class="var-name">$language</span>, [<span class="var-type"></span> <span class="var-name">$force_reset</span> = <span class="var-default">false</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$language</span><span class="var-description">: The name of the language to use</span> </li> - <li> - <span class="var-type"></span> - <span class="var-name">$force_reset</span> </li> - </ul> - - - </div> -<a name="methodset_language_path" id="set_language_path"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_language_path</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a703">703</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the path to the directory containing the language files. Note that this path is relative to the directory of the script that included geshi.php, NOT geshi.php itself.</p> - <ul class="tags"> - <li><span class="field">deprecated:</span> The path to the language files should now be automatically detected, so this method should no longer be needed. The 1.1.X branch handles manual setting of the path differently so this method will disappear in 1.2.0.</li> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_language_path - </span> - (<span class="var-type">string</span> <span class="var-name">$path</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$path</span><span class="var-description">: The path to the language directory</span> </li> - </ul> - - - </div> -<a name="methodset_line_ending" id="set_line_ending"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_line_ending</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1709">1709</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the line-ending</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_line_ending - </span> - (<span class="var-type">string</span> <span class="var-name">$line_ending</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$line_ending</span><span class="var-description">: The new line-ending</span> </li> - </ul> - - - </div> -<a name="methodset_line_style" id="set_line_style"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_line_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a844">844</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the styles for the line numbers.</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_line_style - </span> - (<span class="var-type">string</span> <span class="var-name">$style1</span>, [<span class="var-type">string|boolean</span> <span class="var-name">$style2</span> = <span class="var-default">''</span>], [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$style1</span><span class="var-description">: The style for the line numbers that are "normal"</span> </li> - <li> - <span class="var-type">string|boolean</span> - <span class="var-name">$style2</span><span class="var-description">: If a string, this is the style of the line numbers that are "fancy", otherwise if boolean then this defines whether the normal styles should be merged with the new normal styles or not</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$preserve_defaults</span><span class="var-description">: If set, is the flag for whether to merge the "fancy" styles with the current styles or not</span> </li> - </ul> - - - </div> -<a name="methodset_link_styles" id="set_link_styles"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_link_styles</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1606">1606</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets styles for links in code</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_link_styles - </span> - (<span class="var-type">int</span> <span class="var-name">$type</span>, <span class="var-type">string</span> <span class="var-name">$styles</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$type</span><span class="var-description">: A constant that specifies what state the style is being set for - e.g. :hover or :visited</span> </li> - <li> - <span class="var-type">string</span> - <span class="var-name">$styles</span><span class="var-description">: The styles to use for that state</span> </li> - </ul> - - - </div> -<a name="methodset_link_target" id="set_link_target"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_link_target</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1616">1616</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the target for links in code</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.3</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_link_target - </span> - (<span class="var-type">string</span> <span class="var-name">$target</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$target</span><span class="var-description">: The target for links in the code, e.g. _blank</span> </li> - </ul> - - - </div> -<a name="methodset_methods_highlighting" id="set_methods_highlighting"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_methods_highlighting</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1162">1162</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Turns highlighting on/off for methods</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_methods_highlighting - </span> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: Whether to turn highlighting for methods on or off</span> </li> - </ul> - - - </div> -<a name="methodset_methods_style" id="set_methods_style"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_methods_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1148">1148</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the styles for methods. $key is a number that references the</p> -<p class="description"><p>appropriate "object splitter" - see the language file for the language you are highlighting to get this number. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</p></p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_methods_style - </span> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$key</span><span class="var-description">: The key of the object splitter to change the styles of</span> </li> - <li> - <span class="var-type">string</span> - <span class="var-name">$style</span><span class="var-description">: The style to make the methods</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$preserve_defaults</span><span class="var-description">: Whether to merge the new styles with the old or just to overwrite them</span> </li> - </ul> - - - </div> -<a name="methodset_numbers_highlighting" id="set_numbers_highlighting"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_numbers_highlighting</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1131">1131</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Turns highlighting on/off for numbers</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_numbers_highlighting - </span> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: Whether to turn highlighting for numbers on or off</span> </li> - </ul> - - - </div> -<a name="methodset_numbers_style" id="set_numbers_style"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_numbers_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1117">1117</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the styles for numbers. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_numbers_style - </span> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$style</span><span class="var-description">: The style to make the numbers</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$preserve_defaults</span><span class="var-description">: Whether to merge the new styles with the old or just to overwrite them</span> </li> - </ul> - - - </div> -<a name="methodset_overall_class" id="set_overall_class"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_overall_class</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a783">783</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the overall classname for this block of code. This class can then be used in a stylesheet to style this object's output</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_overall_class - </span> - (<span class="var-type">string</span> <span class="var-name">$class</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$class</span><span class="var-description">: The class name to use for this block of code</span> </li> - </ul> - - - </div> -<a name="methodset_overall_id" id="set_overall_id"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_overall_id</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a794">794</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the overall id for this block of code. This id can then be used in a stylesheet to style this object's output</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_overall_id - </span> - (<span class="var-type">string</span> <span class="var-name">$id</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$id</span><span class="var-description">: The ID to use for this block of code</span> </li> - </ul> - - - </div> -<a name="methodset_overall_style" id="set_overall_style"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_overall_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a767">767</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the styles for the code that will be outputted when this object is parsed. The style should be a string of valid stylesheet declarations</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_overall_style - </span> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$style</span><span class="var-description">: The overall style for the outputted code block</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$preserve_defaults</span><span class="var-description">: Whether to merge the styles with the current styles or not</span> </li> - </ul> - - - </div> -<a name="methodset_regexps_highlighting" id="set_regexps_highlighting"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_regexps_highlighting</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1191">1191</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Turns highlighting on/off for regexps</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_regexps_highlighting - </span> - (<span class="var-type">int</span> <span class="var-name">$key</span>, <span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$key</span><span class="var-description">: The key of the regular expression group to turn on or off</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: Whether to turn highlighting for the regular expression group on or off</span> </li> - </ul> - - - </div> -<a name="methodset_regexps_style" id="set_regexps_style"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_regexps_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1176">1176</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the styles for regexps. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_regexps_style - </span> - (<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">boolean</span> <span class="var-name">$style</span>, [<span class="var-type"></span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$key</span><span class="var-description">: The style to make the regular expression matches</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$style</span><span class="var-description">: Whether to merge the new styles with the old or just to overwrite them</span> </li> - <li> - <span class="var-type"></span> - <span class="var-name">$preserve_defaults</span> </li> - </ul> - - - </div> -<a name="methodset_source" id="set_source"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_source</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a645">645</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the source code for this object</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_source - </span> - (<span class="var-type">string</span> <span class="var-name">$source</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$source</span><span class="var-description">: The source code to highlight</span> </li> - </ul> - - - </div> -<a name="methodset_strings_highlighting" id="set_strings_highlighting"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_strings_highlighting</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1103">1103</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Turns highlighting on/off for strings</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_strings_highlighting - </span> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: Whether to turn highlighting for strings on or off</span> </li> - </ul> - - - </div> -<a name="methodset_strings_style" id="set_strings_style"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_strings_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1089">1089</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the styles for strings. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_strings_style - </span> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$style</span><span class="var-description">: The style to make the escape characters</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$preserve_defaults</span><span class="var-description">: Whether to merge the new styles with the old or just to overwrite them</span> </li> - </ul> - - - </div> -<a name="methodset_symbols_highlighting" id="set_symbols_highlighting"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_symbols_highlighting</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1071">1071</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Turns highlighting on/off for symbols</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_symbols_highlighting - </span> - (<span class="var-type">boolean</span> <span class="var-name">$flag</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$flag</span><span class="var-description">: Whether to turn highlighting for symbols on or off</span> </li> - </ul> - - - </div> -<a name="methodset_symbols_style" id="set_symbols_style"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_symbols_style</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1051">1051</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the styles for symbols. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.1</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_symbols_style - </span> - (<span class="var-type">string</span> <span class="var-name">$style</span>, [<span class="var-type">boolean</span> <span class="var-name">$preserve_defaults</span> = <span class="var-default">false</span>], [<span class="var-type">int</span> <span class="var-name">$group</span> = <span class="var-default">0</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$style</span><span class="var-description">: The style to make the symbols</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$preserve_defaults</span><span class="var-description">: Whether to merge the new styles with the old or just to overwrite them</span> </li> - <li> - <span class="var-type">int</span> - <span class="var-name">$group</span><span class="var-description">: Tells the group of symbols for which style should be set.</span> </li> - </ul> - - - </div> -<a name="methodset_tab_width" id="set_tab_width"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_tab_width</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1231">1231</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets how many spaces a tab is substituted for</p> -<p class="description"><p>Widths below zero are ignored</p></p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.0</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_tab_width - </span> - (<span class="var-type">int</span> <span class="var-name">$width</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$width</span><span class="var-description">: The tab width</span> </li> - </ul> - - - </div> -<a name="methodset_url_for_keyword_group" id="set_url_for_keyword_group"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_url_for_keyword_group</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1594">1594</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets the base URL to be used for keywords</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_url_for_keyword_group - </span> - (<span class="var-type">int</span> <span class="var-name">$group</span>, <span class="var-type">string</span> <span class="var-name">$url</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$group</span><span class="var-description">: The key of the keyword group to set the URL for</span> </li> - <li> - <span class="var-type">string</span> - <span class="var-name">$url</span><span class="var-description">: The URL to set for the group. If {FNAME} is in the url somewhere, it is replaced by the keyword that the URL is being made for</span> </li> - </ul> - - - </div> -<a name="methodset_use_language_tab_width" id="set_use_language_tab_width"><!-- --></a> -<div class="oddrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">set_use_language_tab_width</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1247">1247</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets whether or not to use tab-stop width specifed by language</p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.7.20</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - set_use_language_tab_width - </span> - (<span class="var-type">boolean</span> <span class="var-name">$use</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$use</span><span class="var-description">: Whether to use language-specific tab-stop widths</span> </li> - </ul> - - - </div> -<a name="methodstart_line_numbers_at" id="start_line_numbers_at"><!-- --></a> -<div class="evenrow"> - - <div class="method-header"> - <img src="../../media/images/Method.png" /> - <span class="method-title">start_line_numbers_at</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a1728">1728</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Sets what number line numbers should start at. Should be a positive integer, and will be converted to one.</p> -<p class="description"><p><strong>Warning:</strong> Using this method will add the "start" attribute to the &lt;ol&gt; that is used for line numbering. This is <strong>not</strong> valid XHTML strict, so if that's what you care about then don't use this method. Firefox is getting support for the CSS method of doing this in 1.1 and Opera has support for the CSS method, but (of course) IE doesn't so it's not worth doing it the CSS way yet.</p></p> - <ul class="tags"> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - - <div class="method-signature"> - <span class="method-result">void</span> - <span class="method-name"> - start_line_numbers_at - </span> - (<span class="var-type">int</span> <span class="var-name">$number</span>) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">int</span> - <span class="var-name">$number</span><span class="var-description">: The number to start line numbers at</span> </li> - </ul> - - - </div> - - </div> - </div> - - - <p class="notes" id="credit"> - Documentation generated on Thu, 25 Dec 2008 14:34:52 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a> - </p> - </div></body> -</html>
\ No newline at end of file diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/geshi/core/_geshi.php.html b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/geshi/core/_geshi.php.html deleted file mode 100644 index 03527b1a..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/geshi/core/_geshi.php.html +++ /dev/null @@ -1,478 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <!-- template designed by Marco Von Ballmoos --> - <title>Docs for page geshi.php</title> - <link rel="stylesheet" href="../../media/stylesheet.css" /> - <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> - </head> - <body> - <div class="page-body"> -<h2 class="file-name"><img src="../../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/geshi.php</h2> - -<a name="sec-description"></a> -<div class="info-box"> - <div class="info-box-title">Description</div> - <div class="nav-bar"> - <span class="disabled">Description</span> | - <a href="#sec-classes">Classes</a> - | <a href="#sec-constants">Constants</a> - | <a href="#sec-functions">Functions</a> - </div> - <div class="info-box-body"> - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">GeSHi - Generic Syntax Highlighter</p> -<p class="description"><p>The GeSHi class for Generic Syntax Highlighting. Please refer to the documentation at http://qbnz.com/highlighter/documentation.php for more information about how to use this class.</p><p>For changes, release notes, TODOs etc, see the relevant files in the docs/ directory.</p><p>This file is part of GeSHi.</p><p>GeSHi is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</p><p>GeSHi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p><p>You should have received a copy of the GNU General Public License along with GeSHi; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p></p> - <ul class="tags"> - <li><span class="field">author:</span> Nigel McNie <<a href="mailto:nigel@geshi.org">nigel@geshi.org</a>>, Benny Baumann <BenBE@geshi.org></li> - <li><span class="field">copyright:</span> (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2014 Benny Baumann</li> - <li><span class="field">filesource:</span> <a href="../../__filesource/fsource_geshi_core_geshi.php.html">Source Code for this file</a></li> - <li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL</a></li> - </ul> - - </div> -</div> - - <a name="sec-classes"></a> - <div class="info-box"> - <div class="info-box-title">Classes</div> - <div class="nav-bar"> - <a href="#sec-description">Description</a> | - <span class="disabled">Classes</span> - | <a href="#sec-constants">Constants</a> - | <a href="#sec-functions">Functions</a> - </div> - <div class="info-box-body"> - <table cellpadding="2" cellspacing="0" class="class-table"> - <tr> - <th class="class-table-header">Class</th> - <th class="class-table-header">Description</th> - </tr> - <tr> - <td style="padding-right: 2em; vertical-align: top; white-space: nowrap"> - <img src="../../media/images/Class.png" - alt=" class" - title=" class"/> - <a href="../../geshi/core/GeSHi.html">GeSHi</a> - </td> - <td> - The GeSHi Class. - </td> - </tr> - </table> - </div> - </div> - - - <a name="sec-constants"></a> - <div class="info-box"> - <div class="info-box-title">Constants</div> - <div class="nav-bar"> - <a href="#sec-description">Description</a> | - <a href="#sec-classes">Classes</a> - | <span class="disabled">Constants</span> - | <a href="#sec-functions">Functions</a> - </div> - <div class="info-box-body"> - <a name="defineGESHI_ACTIVE"><!-- --></a> -<div class="oddrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_ACTIVE</span> = 2 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a107">107</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Links in the source in the :active state</p> - - -</div> -<a name="defineGESHI_CAPS_LOWER"><!-- --></a> -<div class="evenrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_CAPS_LOWER</span> = 2 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a99">99</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Leave keywords found as the case that they are</p> - - -</div> -<a name="defineGESHI_CAPS_NO_CHANGE"><!-- --></a> -<div class="oddrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_CAPS_NO_CHANGE</span> = 0 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a95">95</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Lowercase keywords found</p> - - -</div> -<a name="defineGESHI_CAPS_UPPER"><!-- --></a> -<div class="evenrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_CAPS_UPPER</span> = 1 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a97">97</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Uppercase keywords found</p> - - -</div> -<a name="defineGESHI_END_IMPORTANT"><!-- --></a> -<div class="oddrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_END_IMPORTANT</span> = '<END GeSHi>' - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a117">117</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">The ender for important parts of the source</p> - - -</div> -<a name="defineGESHI_FANCY_LINE_NUMBERS"><!-- --></a> -<div class="evenrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_FANCY_LINE_NUMBERS</span> = 2 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a67">67</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Use fancy line numbers when building the result</p> - - -</div> -<a name="defineGESHI_HEADER_DIV"><!-- --></a> -<div class="oddrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_HEADER_DIV</span> = 1 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a73">73</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Use a "div" to surround the source</p> - - -</div> -<a name="defineGESHI_HEADER_NONE"><!-- --></a> -<div class="evenrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_HEADER_NONE</span> = 0 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a71">71</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Use nothing to surround the source</p> - - -</div> -<a name="defineGESHI_HEADER_PRE"><!-- --></a> -<div class="oddrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_HEADER_PRE</span> = 2 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a75">75</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Use a "pre" to surround the source</p> - - -</div> -<a name="defineGESHI_HEADER_PRE_TABLE"><!-- --></a> -<div class="evenrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_HEADER_PRE_TABLE</span> = 4 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a91">91</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Use a "table" to surround the source:</p> -<p class="description"><p><table> <thead><tr><td colspan="2">$header</td></tr></thead> <tbody><tr><td><pre>$linenumbers</pre></td><td><pre>$code></pre></td></tr></tbody> <tfooter><tr><td colspan="2">$footer</td></tr></tfoot> </table></p><p>this is essentially only a workaround for Firefox, see sf#1651996 or take a look at https://bugzilla.mozilla.org/show_bug.cgi?id=365805</p></p> - <ul class="tags"> - <li><span class="field">note:</span> when linenumbers are disabled this is essentially the same as GESHI_HEADER_PRE</li> - </ul> - - -</div> -<a name="defineGESHI_HEADER_PRE_VALID"><!-- --></a> -<div class="oddrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_HEADER_PRE_VALID</span> = 3 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a77">77</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Use a pre to wrap lines when line numbers are enabled or to wrap the whole code.</p> - - -</div> -<a name="defineGESHI_HOVER"><!-- --></a> -<div class="evenrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_HOVER</span> = 1 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a105">105</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Links in the source in the :hover state</p> - - -</div> -<a name="defineGESHI_LANG_ROOT"><!-- --></a> -<div class="oddrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_LANG_ROOT</span> = GESHI_ROOT.'geshi'.DIRECTORY_SEPARATOR - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a53">53</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">The language file directory for GeSHi</p> - - -</div> -<a name="defineGESHI_LINK"><!-- --></a> -<div class="evenrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_LINK</span> = 0 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a103">103</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Links in the source in the :link state</p> - - -</div> -<a name="defineGESHI_NORMAL_LINE_NUMBERS"><!-- --></a> -<div class="oddrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_NORMAL_LINE_NUMBERS</span> = 1 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a65">65</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Use normal line numbers when building the result</p> - - -</div> -<a name="defineGESHI_NO_LINE_NUMBERS"><!-- --></a> -<div class="evenrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_NO_LINE_NUMBERS</span> = 0 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a63">63</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Use no line numbers when building the result</p> - - -</div> -<a name="defineGESHI_ROOT"><!-- --></a> -<div class="oddrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_ROOT</span> = dirname(__FILE__).DIRECTORY_SEPARATOR - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a49">49</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">The root directory for GeSHi</p> - - -</div> -<a name="defineGESHI_SECURITY_PARANOID"><!-- --></a> -<div class="evenrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_SECURITY_PARANOID</span> = false - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a58">58</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Tells GeSHi to be paranoid about security settings</p> - - -</div> -<a name="defineGESHI_START_IMPORTANT"><!-- --></a> -<div class="oddrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_START_IMPORTANT</span> = '<BEGIN GeSHi>' - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a115">115</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">The starter for important parts of the source</p> - - -</div> -<a name="defineGESHI_VERSION"><!-- --></a> -<div class="evenrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_VERSION</span> = '1.0.8.2', - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a44">44</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">The version of this GeSHi file</p> - - -</div> -<a name="defineGESHI_VISITED"><!-- --></a> -<div class="oddrow"> - - <div> - <img src="../../media/images/Constant.png" /> - <span class="const-title"> - <span class="const-name">GESHI_VISITED</span> = 3 - (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a109">109</a></span>) - </span> - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Links in the source in the :visited state</p> - - -</div> - </div> - </div> - - - <a name="sec-functions"></a> - <div class="info-box"> - <div class="info-box-title">Functions</div> - <div class="nav-bar"> - <a href="#sec-description">Description</a> | - <a href="#sec-classes">Classes</a> - | <a href="#sec-constants">Constants</a> - | <span class="disabled">Functions</span> - </div> - <div class="info-box-body"> - <a name="functiongeshi_highlight" id="functiongeshi_highlight"><!-- --></a> -<div class="evenrow"> - - <div> - <img src="../../media/images/Function.png" /> - <span class="method-title">geshi_highlight</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a4577">4577</a></span>) - </div> - - <!-- ========== Info from phpDoc block ========= --> -<p class="short-description">Easy way to highlight stuff. Behaves just like highlight_string</p> - <ul class="tags"> - <li><span class="field">return:</span> The code highlighted (if $return is true)</li> - <li><span class="field">since:</span> 1.0.2</li> - </ul> - <div class="method-signature"> - <span class="method-result">string</span> - <span class="method-name"> - geshi_highlight - </span> - (<span class="var-type">string</span> <span class="var-name">$string</span>, <span class="var-type">string</span> <span class="var-name">$language</span>, [<span class="var-type">string</span> <span class="var-name">$path</span> = <span class="var-default">null</span>], [<span class="var-type">boolean</span> <span class="var-name">$return</span> = <span class="var-default">false</span>]) - </div> - - <ul class="parameters"> - <li> - <span class="var-type">string</span> - <span class="var-name">$string</span><span class="var-description">: The code to highlight</span> </li> - <li> - <span class="var-type">string</span> - <span class="var-name">$language</span><span class="var-description">: The language to highlight the code in</span> </li> - <li> - <span class="var-type">string</span> - <span class="var-name">$path</span><span class="var-description">: The path to the language files. You can leave this blank if you need as from version 1.0.7 the path should be automatically detected</span> </li> - <li> - <span class="var-type">boolean</span> - <span class="var-name">$return</span><span class="var-description">: Whether to return the result or to echo</span> </li> - </ul> - - -</div> - </div> - </div> - - <p class="notes" id="credit"> - Documentation generated on Thu, 25 Dec 2008 14:34:34 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a> - </p> - </div></body> -</html>
\ No newline at end of file diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/index.html b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/index.html deleted file mode 100644 index f499a8f9..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/index.html +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE html - PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//FR" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <!-- Generated by phpDocumentor on Thu, 25 Dec 2008 14:34:34 +0100 --> - <title>GeSHi 1.0.8</title> - <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> -</head> - -<FRAMESET rows='120,*'> - <FRAME src='packages.html' name='left_top' frameborder="1" bordercolor="#999999"> - <FRAMESET cols='25%,*'> - <FRAME src='li_geshi.html' name='left_bottom' frameborder="1" bordercolor="#999999"> - <FRAME src='blank.html' name='right' frameborder="1" bordercolor="#999999"> - </FRAMESET> - <NOFRAMES> - <H2>Frame Alert</H2> - <P>This document is designed to be viewed using the frames feature. - If you see this message, you are using a non-frame-capable web client.</P> - </NOFRAMES> -</FRAMESET> -</HTML>
\ No newline at end of file diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/li_geshi.html b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/li_geshi.html deleted file mode 100644 index f074e378..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/li_geshi.html +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <!-- template designed by Marco Von Ballmoos --> - <title></title> - <link rel="stylesheet" href="media/stylesheet.css" /> - <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> - </head> - <body> - <div class="package-title">geshi</div> -<div class="package-details"> - - <dl class="tree"> - - <dt class="folder-title">Description</dt> - <dd> - <a href='classtrees_geshi.html' target='right'>Class trees</a><br /> - <a href='elementindex_geshi.html' target='right'>Index of elements</a><br /> - <a href="todolist.html" target="right">Todo List</a><br /> - </dd> - - - - - - - - <dt class="sub-package"><img class="tree-icon" src="media/images/package.png" alt="Sub-package">core</dt> - <dd> - <dl class="tree"> - <dt class="folder-title"><img class="tree-icon" src="media/images/class_folder.png" alt=" ">Classes</dt> - <dd><img class="tree-icon" src="media/images/Class.png" alt="Class"><a href='geshi/core/GeSHi.html' target='right'>GeSHi</a></dd> - <dt class="folder-title"><img class="tree-icon" src="media/images/function_folder.png" alt=" ">Functions</dt> - <dd><img class="tree-icon" src="media/images/Function.png" alt="Function"><a href='geshi/core/_geshi.php.html#functiongeshi_highlight' target='right'>geshi_highlight</a></dd> - <dt class="folder-title"><img class="tree-icon" src="media/images/folder.png" alt=" ">Files</dt> - <dd><img class="tree-icon" src="media/images/Page.png" alt="File"><a href='geshi/core/_geshi.php.html' target='right'>geshi.php</a></dd> - </dl> - </dd> - - - </dl> -</div> -<p class="notes"><a href="http://www.phpdoc.org" target="_blank">phpDocumentor v <span class="field">1.4.2</span></a></p> -</BODY> -</HTML>
\ No newline at end of file diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/banner.css b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/banner.css deleted file mode 100644 index 032b037f..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/banner.css +++ /dev/null @@ -1,33 +0,0 @@ -body -{ - background-color: #EEEEEE; - margin: 0px; - padding: 0px; -} - -/* Banner (top bar) classes */ - -.banner { } - -.banner-menu -{ - text-align: right; - clear: both; - padding: .5em; - border-top: 2px solid #AAAAAA; -} - -.banner-title -{ - text-align: right; - font-size: 20pt; - font-weight: bold; - margin: .2em; -} - -.package-selector -{ - background-color: #DDDDDD; - border: 1px solid #AAAAAA; - color: #000090; -} diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractClass.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractClass.png Binary files differdeleted file mode 100644 index b1f60760..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractClass.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractClass_logo.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractClass_logo.png Binary files differdeleted file mode 100644 index ab21d652..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractClass_logo.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractMethod.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractMethod.png Binary files differdeleted file mode 100644 index 635fa08b..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractMethod.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractPrivateClass.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractPrivateClass.png Binary files differdeleted file mode 100644 index eb2938e8..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractPrivateClass.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractPrivateClass_logo.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractPrivateClass_logo.png Binary files differdeleted file mode 100644 index 93c1da85..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractPrivateClass_logo.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractPrivateMethod.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractPrivateMethod.png Binary files differdeleted file mode 100644 index 203ce61d..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/AbstractPrivateMethod.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Class.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Class.png Binary files differdeleted file mode 100644 index 9ac7daa9..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Class.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Class_logo.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Class_logo.png Binary files differdeleted file mode 100644 index 2c97193a..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Class_logo.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Constant.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Constant.png Binary files differdeleted file mode 100644 index c3610cb9..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Constant.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Constructor.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Constructor.png Binary files differdeleted file mode 100644 index cb78dcd2..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Constructor.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Destructor.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Destructor.png Binary files differdeleted file mode 100644 index d60215d6..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Destructor.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Function.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Function.png Binary files differdeleted file mode 100644 index 5f05eb2f..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Function.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Global.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Global.png Binary files differdeleted file mode 100644 index f00968b7..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Global.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/I.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/I.png Binary files differdeleted file mode 100644 index 874f1ba5..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/I.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Index.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Index.png Binary files differdeleted file mode 100644 index 09cead5f..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Index.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Interface.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Interface.png Binary files differdeleted file mode 100644 index 4ab1592e..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Interface.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Interface_logo.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Interface_logo.png Binary files differdeleted file mode 100644 index 2c97193a..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Interface_logo.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/L.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/L.png Binary files differdeleted file mode 100644 index dc49c4ee..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/L.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Lminus.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Lminus.png Binary files differdeleted file mode 100644 index a7346d22..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Lminus.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Lplus.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Lplus.png Binary files differdeleted file mode 100644 index 673ab01b..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Lplus.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Method.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Method.png Binary files differdeleted file mode 100644 index e5b154b5..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Method.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Page.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Page.png Binary files differdeleted file mode 100644 index 4d3a3771..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Page.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Page_logo.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Page_logo.png Binary files differdeleted file mode 100644 index 91437deb..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Page_logo.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/PrivateClass.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/PrivateClass.png Binary files differdeleted file mode 100644 index 88431d4f..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/PrivateClass.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/PrivateClass_logo.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/PrivateClass_logo.png Binary files differdeleted file mode 100644 index c9d3a58a..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/PrivateClass_logo.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/PrivateMethod.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/PrivateMethod.png Binary files differdeleted file mode 100644 index 9b9f7335..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/PrivateMethod.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/PrivateVariable.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/PrivateVariable.png Binary files differdeleted file mode 100644 index fef0a273..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/PrivateVariable.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/StaticMethod.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/StaticMethod.png Binary files differdeleted file mode 100644 index e5b154b5..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/StaticMethod.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/StaticVariable.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/StaticVariable.png Binary files differdeleted file mode 100644 index 2a372b48..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/StaticVariable.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/T.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/T.png Binary files differdeleted file mode 100644 index e6f55bd8..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/T.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Tminus.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Tminus.png Binary files differdeleted file mode 100644 index 226ba0c0..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Tminus.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Tplus.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Tplus.png Binary files differdeleted file mode 100644 index e9a3c4ee..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Tplus.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Variable.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Variable.png Binary files differdeleted file mode 100644 index 2a372b48..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/Variable.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/blank.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/blank.png Binary files differdeleted file mode 100644 index 9c1bda19..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/blank.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/class_folder.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/class_folder.png Binary files differdeleted file mode 100644 index be0face2..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/class_folder.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/empty.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/empty.png Binary files differdeleted file mode 100644 index d5683865..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/empty.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/file.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/file.png Binary files differdeleted file mode 100644 index 8ff962fd..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/file.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/folder.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/folder.png Binary files differdeleted file mode 100644 index b793328d..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/folder.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/function_folder.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/function_folder.png Binary files differdeleted file mode 100644 index 6d8861c7..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/function_folder.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/next_button.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/next_button.png Binary files differdeleted file mode 100644 index 521f29a8..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/next_button.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/next_button_disabled.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/next_button_disabled.png Binary files differdeleted file mode 100644 index def00128..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/next_button_disabled.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/package.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/package.png Binary files differdeleted file mode 100644 index 6fe427a5..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/package.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/package_folder.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/package_folder.png Binary files differdeleted file mode 100644 index f504b70d..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/package_folder.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/previous_button.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/previous_button.png Binary files differdeleted file mode 100644 index 9f0c62d4..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/previous_button.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/previous_button_disabled.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/previous_button_disabled.png Binary files differdeleted file mode 100644 index 850edcfd..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/previous_button_disabled.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/private_class_logo.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/private_class_logo.png Binary files differdeleted file mode 100644 index c9d3a58a..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/private_class_logo.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/tutorial.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/tutorial.png Binary files differdeleted file mode 100644 index 14443d8c..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/tutorial.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/tutorial_folder.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/tutorial_folder.png Binary files differdeleted file mode 100644 index 6e28f012..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/tutorial_folder.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/up_button.png b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/up_button.png Binary files differdeleted file mode 100644 index bd9ff8cd..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/images/up_button.png +++ /dev/null diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/stylesheet.css b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/stylesheet.css deleted file mode 100644 index 96729b65..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/media/stylesheet.css +++ /dev/null @@ -1,146 +0,0 @@ -a { color: #000090; text-decoration: none; } -a:hover, a:active, a:focus { color: highlighttext; background-color: highlight; text-decoration: none; } - -body { background: #FFFFFF; } -body, table { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; } - -a img { border: 0px; } - -/* Page layout/boxes */ - -.info-box { } -.info-box-title { margin: 1em 0em 0em 0em; font-weight: normal; font-size: 14pt; color: #999999; border-bottom: 2px solid #999999; } -.info-box-body { border: 1px solid #999999; padding: .5em; } -.nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; } - -.oddrow { background-color: #F8F8F8; border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} -.evenrow { border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} - -.page-body { max-width: 800px; margin: auto; } -.tree { white-space: nowrap; font: icon } -.tree dd { margin-left: 19px } -.tree dl { margin: 0px } -.tree-icon { vertical-align: middle; border: 0px; margin-right: 3px } - -/* Index formatting classes */ - -.index-item-body { margin-top: .5em; margin-bottom: .5em} -.index-item-description { margin-top: .25em } -.index-item-details { font-weight: normal; font-style: italic; font-size: 8pt } -.index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em} -.index-letter-title { font-size: 12pt; font-weight: bold } -.index-letter-menu { text-align: center; margin: 1em } -.index-letter { font-size: 12pt } - -/* Docbook classes */ - -.description {} -.short-description { font-weight: bold; color: #666666; } -.tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; } -.parameters { padding-left: 0em; margin-left: 3em; color: #014fbe; list-style-type: square; } -.redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; } -.package { font-weight: bold; } -.package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black } -.package-details { font-size: 85%; } -.sub-package { font-weight: bold; } -.tutorial { border-width: thin; border-color: #0066ff; } -.tutorial-nav-box { width: 100%; border: 1px solid #999999; background-color: #F8F8F8; } -.folder-title { font-style: italic; font-family: Verdana, Arial, Helvetica, sans-serif } - -/* Generic formatting */ - -.field { font-weight: bold; } -.detail { font-size: 8pt; } -.notes { font-style: italic; font-size: 8pt; } -.separator { background-color: #999999; height: 2px; } -.warning { color: #FF6600; } -.disabled { font-style: italic; color: #999999; } - -/* Code elements */ - -.line-number { } - -.class-table { width: 100%; } -.class-table-header { border-bottom: 1px dotted #666666; text-align: left} -.class-name { color: #0000AA; font-weight: bold; } - -.method-summary { color: #009000; padding-left: 1em; font-size: 8pt; } -.method-header { } -.method-definition { margin-bottom: .2em } -.method-title { color: #009000; font-weight: bold; } -.method-name { font-weight: bold; } -.method-signature { font-size: 85%; color: #666666; margin: .5em 0em } -.method-result { font-style: italic; } - -.var-summary { padding-left: 1em; font-size: 8pt; } -.var-header { } -.var-title { color: #014fbe; margin-bottom: .3em } -.var-type { font-style: italic; } -.var-name { font-weight: bold; } -.var-default {} -.var-description { font-weight: normal; color: #000000; } - -.include-title { color: #014fbe;} -.include-type { font-style: italic; } -.include-name { font-weight: bold; } - -.const-title { color: #FF6600; } -.const-name { font-weight: bold; } - -/* Syntax highlighting */ - -.src-code { font-family: 'Courier New', Courier, monospace; font-weight: normal; } -.src-line { font-family: 'Courier New', Courier, monospace; font-weight: normal; } - -.src-code a:link { padding: 1px; text-decoration: underline; color: #0000DD; } -.src-code a:visited { text-decoration: underline; color: #0000DD; } -.src-code a:active { background-color: #FFFF66; color: #008000; } -.src-code a:hover { background-color: #FFFF66; text-decoration: overline underline; color: #008000; } - -.src-comm { color: #666666; } -.src-id { color: #FF6600; font-style: italic; } -.src-inc { color: #0000AA; font-weight: bold; } -.src-key { color: #0000AA; font-weight: bold; } -.src-num { color: #CC0000; } -.src-str { color: #CC0000; } -.src-sym { } -.src-var { } - -.src-php { font-weight: bold; } - -.src-doc { color: #666666; } -.src-doc-close-template { color: #666666 } -.src-doc-coretag { color: #008000; } -.src-doc-inlinetag {} -.src-doc-internal {} -.src-doc-tag { color: #0080CC; } -.src-doc-template { color: #666666 } -.src-doc-type { font-style: italic; color: #444444 } -.src-doc-var { color: #444444 } - -.tute-tag { color: #009999 } -.tute-attribute-name { color: #0000FF } -.tute-attribute-value { color: #0099FF } -.tute-entity { font-weight: bold; } -.tute-comment { font-style: italic } -.tute-inline-tag { color: #636311; font-weight: bold } - -/* tutorial */ - -.authors { } -.author { font-style: italic; font-weight: bold } -.author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal } -.example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; } -*[class="example"] { line-height : 1.0em; } -.listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap; } -*[class="listing"] { line-height : 1.0em; } -.release-info { font-size: 85%; font-style: italic; margin: 1em 0em } -.ref-title-box { } -.ref-title { } -.ref-purpose { font-style: italic; color: #666666 } -.ref-synopsis { } -.title { font-weight: bold; border-bottom: 1px solid #999999; color: #999999; } -.cmd-synopsis { margin: 1em 0em } -.cmd-title { font-weight: bold } -.toc { margin-left: 2em; padding-left: 0em } - diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/packages.html b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/packages.html deleted file mode 100644 index d8c4c04a..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/packages.html +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <!-- template designed by Marco Von Ballmoos --> - <title></title> - <link rel="stylesheet" href="media/stylesheet.css" /> - <link rel="stylesheet" href="media/banner.css" /> - <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> - </head> - <body> - <div class="banner"> - <div class="banner-title">geshi</div> - <div class="banner-menu"> - <form> - <table cellpadding="0" cellspacing="0" style="width: 100%"> - <tr> - <td> - </td> - <td style="width: 2em"> </td> - <td style="text-align: right"> - </td> - </tr> - </table> - </form> - </div> - </div> - </body> - </html>
\ No newline at end of file diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/todolist.html b/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/todolist.html deleted file mode 100644 index 95177c15..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/todolist.html +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <!-- template designed by Marco Von Ballmoos --> - <title>Todo List</title> - <link rel="stylesheet" href="media/stylesheet.css" /> - <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> - </head> - <body> - <div align="center"><h1>Todo List</h1></div> -<h2>geshi</h2> -<h3><a href="geshi/core/GeSHi.html#methoddisable_highlighting">GeSHi::disable_highlighting()</a></h3> -<ul> - <li>Rewrite with array traversal</li> -</ul> -<h3><a href="geshi/core/GeSHi.html#methodenable_highlighting">GeSHi::enable_highlighting()</a></h3> -<ul> - <li>Rewrite with array traversal</li> -</ul> -<h3><a href="geshi/core/GeSHi.html#methodenable_important_blocks">GeSHi::enable_important_blocks()</a></h3> -<ul> - <li>REMOVE THIS SHIZ FROM GESHI!</li> -</ul> -<h3><a href="geshi/core/GeSHi.html#methodget_language_name_from_extension">GeSHi::get_language_name_from_extension()</a></h3> -<ul> - <li>Re-think about how this method works (maybe make it private and/or make it a extension->lang lookup?)</li> - <li>static?</li> -</ul> -<h3><a href="geshi/core/GeSHi.html#methodhighlight_lines_extra">GeSHi::highlight_lines_extra()</a></h3> -<ul> - <li>Some data replication here that could be cut down on</li> -</ul> -<h3><a href="geshi/core/GeSHi.html#methodload_from_file">GeSHi::load_from_file()</a></h3> -<ul> - <li>Complete rethink of this and above method</li> -</ul> - <p class="notes" id="credit"> - Documentation generated on Thu, 25 Dec 2008 14:34:53 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a> - </p> - </body> -</html>
\ No newline at end of file |