summaryrefslogtreecommitdiff
path: root/framework/3rdParty/geshi/geshi.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/3rdParty/geshi/geshi.php')
-rw-r--r--framework/3rdParty/geshi/geshi.php272
1 files changed, 136 insertions, 136 deletions
diff --git a/framework/3rdParty/geshi/geshi.php b/framework/3rdParty/geshi/geshi.php
index 983a42a0..ca1f40dd 100644
--- a/framework/3rdParty/geshi/geshi.php
+++ b/framework/3rdParty/geshi/geshi.php
@@ -1,7 +1,7 @@
<?php
/**
* GeSHi - Generic Syntax Highlighter
- *
+ *
* 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.
@@ -23,7 +23,7 @@
* 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
- *
+ *
* @package core
* @author Nigel McNie <nigel@geshi.org>
* @copyright Copyright &copy; 2004, 2005, Nigel McNie
@@ -121,10 +121,10 @@ define('GESHI_REPLACE', 1);
/** The key of the regex array defining any modifiers to the regular expression */
define('GESHI_MODIFIERS', 2);
/** The key of the regex array defining what bracket group in a
- matched search to put before the replacement */
+ matched search to put before the replacement */
define('GESHI_BEFORE', 3);
/** The key of the regex array defining what bracket group in a
- matched search to put after the replacement */
+ matched search to put after the replacement */
define('GESHI_AFTER', 4);
/** Used in language files to mark comments */
@@ -150,7 +150,7 @@ define('GESHI_ERROR_INVALID_LINE_NUMBER_TYPE', 5);
* 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.
- *
+ *
* @package core
* @author Nigel McNie <nigel@geshi.org>
* @copyright Copyright &copy; 2004, 2005 Nigel McNie
@@ -165,32 +165,32 @@ class GeSHi
* @var string
*/
protected $source = '';
-
+
/**
* The language to use when highlighting
* @var string
*/
protected $language = '';
-
+
/**
* The data for the language used
* @var array
*/
protected $language_data = array();
-
+
/**
* The path to the language files
* @var string
*/
protected $language_path = GESHI_LANG_ROOT;
-
+
/**
* The error message associated with an error
* @var string
* @todo check err reporting works
*/
protected $error = false;
-
+
/**
* Possible error messages
* @var array
@@ -202,34 +202,34 @@ class GeSHi
GESHI_ERROR_INVALID_HEADER_TYPE => 'The header type specified is invalid',
GESHI_ERROR_INVALID_LINE_NUMBER_TYPE => 'The line number type specified is invalid'
);
-
+
/**
* Whether highlighting is strict or not
* @var boolean
*/
protected $strict_mode = false;
-
+
/**
* Whether to use CSS classes in output
* @var boolean
*/
protected $use_classes = false;
-
+
/**
* The type of header to use. Can be one of the following
* values:
- *
+ *
* <ul>
* <li><b>GESHI_HEADER_PRE</b>: Source is outputted in
* a &lt;pre&gt; HTML element.</li>
* <li><b>GESHI_HEADER_DIV</b>: Source is outputted in
* a &lt;div&gt; HTML element.</li>
* </ul>
- *
+ *
* @var int
*/
protected $header_type = GESHI_HEADER_PRE;
-
+
/**
* Array of permissions for which lexics should be highlighted
* @var array
@@ -252,37 +252,37 @@ class GeSHi
* @var double
*/
protected $time = 0;
-
+
/**
* The content of the header block
* @var string
*/
protected $header_content = '';
-
+
/**
* The content of the footer block
* @var string
*/
protected $footer_content = '';
-
+
/**
* The style of the header block
* @var string
*/
protected $header_content_style = '';
-
+
/**
* The style of the footer block
* @var string
*/
protected $footer_content_style = '';
-
+
/**
* The styles for hyperlinks in the code
* @var array
*/
protected $link_styles = array();
-
+
/**
* Whether important blocks should be recognised or not
* @var boolean
@@ -290,7 +290,7 @@ class GeSHi
* @todo REMOVE THIS FUNCTIONALITY!
*/
protected $enable_important_blocks = false;
-
+
/**
* Styles for important parts of the code
* @var string
@@ -299,25 +299,25 @@ class GeSHi
* will be hard to implement in 1.2
*/
protected $important_styles = 'font-weight: bold; color: red;'; // Styles for important parts of the code
-
+
/**
* Whether CSS IDs should be added to the code
* @var boolean
*/
protected $add_ids = false;
-
+
/**
* Lines that should be highlighted extra
* @var array
*/
protected $highlight_extra_lines = array();
-
+
/**
* Styles of extra-highlighted lines
* @var string
*/
protected $highlight_extra_lines_style = 'color: #cc0; background-color: #ffc;';
-
+
/**
* Number at which line numbers should start at
* @var int
@@ -330,43 +330,43 @@ class GeSHi
* @var string
*/
protected $overall_style = '';
-
+
/**
* The style for the actual code
* @var string
*/
protected $code_style = 'font-family: \'Courier New\', Courier, monospace; font-weight: normal;';
-
+
/**
* The overall class for this code block
* @var string
*/
protected $overall_class = '';
-
+
/**
* The overall ID for this code block
* @var string
*/
protected $overall_id = '';
-
+
/**
* Line number styles
* @var string
*/
protected $line_style1 = 'font-family: \'Courier New\', Courier, monospace; color: black; font-weight: normal; font-style: normal;';
-
+
/**
* Line number styles for fancy lines
* @var string
*/
protected $line_style2 = 'font-weight: bold;';
-
+
/**
* Flag for how line nubmers are displayed
* @var boolean
*/
protected $line_numbers = GESHI_NO_LINE_NUMBERS;
-
+
/**
* The "nth" value for fancy line highlighting
* @var int
@@ -378,13 +378,13 @@ class GeSHi
* @var int
*/
protected $tab_width = 8;
-
+
/**
* Default target for keyword links
* @var string
*/
protected $link_target = '';
-
+
/**
* The encoding to use for entity encoding
* @var string
@@ -401,7 +401,7 @@ class GeSHi
/**
* Creates a new GeSHi object, with source and language
- *
+ *
* @param string The source code to highlight
* @param string The language to highlight the source with
* @param string The path to the language file directory. <b>This
@@ -423,7 +423,7 @@ class GeSHi
/**
* Returns an error message associated with the last GeSHi operation,
* or false if no error has occured
- *
+ *
* @return string|false An error message if there has been an error, else false
* @since 1.0.0
*/
@@ -446,7 +446,7 @@ class GeSHi
/**
* Gets a human-readable language name (thanks to Simon Patterson
* for the idea :))
- *
+ *
* @return string The name for the current language
* @since 1.0.2
*/
@@ -460,7 +460,7 @@ class GeSHi
/**
* Sets the source code for this object
- *
+ *
* @param string The source code to highlight
* @since 1.0.0
*/
@@ -474,7 +474,7 @@ class GeSHi
/**
* Sets the language for this object
- *
+ *
* @param string The name of the language to use
* @since 1.0.0
*/
@@ -482,10 +482,10 @@ class GeSHi
{
$this->error = false;
$this->strict_mode = GESHI_NEVER;
-
+
$language = preg_replace('#[^a-zA-Z0-9\-_]#', '', $language);
$this->language = strtolower($language);
-
+
$file_name = $this->language_path . $this->language . '.php';
if (!is_readable($file_name)) {
$this->error = GESHI_ERROR_NO_SUCH_LANG;
@@ -499,7 +499,7 @@ class GeSHi
* 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.
- *
+ *
* @param string The path to the language directory
* @since 1.0.0
* @deprecated The path to the language files should now be automatically
@@ -516,15 +516,15 @@ class GeSHi
/**
* Sets the type of header to be used.
- *
+ *
* 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.
- *
+ *
* From 1.0.7.2, you can use GESHI_HEADER_NONE to specify that no header code
* should be outputted.
- *
+ *
* @param int The type of header to be used
* @since 1.0.0
*/
@@ -541,7 +541,7 @@ class GeSHi
* 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
- *
+ *
* @param string The overall style for the outputted code block
* @param boolean Whether to merge the styles with the current styles or not
* @since 1.0.0
@@ -559,7 +559,7 @@ class GeSHi
* Sets the overall classname for this block of code. This
* class can then be used in a stylesheet to style this object's
* output
- *
+ *
* @param string The class name to use for this block of code
* @since 1.0.0
*/
@@ -571,7 +571,7 @@ class GeSHi
/**
* Sets the overall id for this block of code. This id can then
* be used in a stylesheet to style this object's output
- *
+ *
* @param string The ID to use for this block of code
* @since 1.0.0
*/
@@ -583,7 +583,7 @@ class GeSHi
/**
* Sets whether CSS classes should be used to highlight the source. Default
* is off, calling this method with no arguments will turn it on
- *
+ *
* @param boolean Whether to turn classes on or not
* @since 1.0.0
*/
@@ -602,7 +602,7 @@ class GeSHi
* 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.
- *
+ *
* @param string The style to use for actual code
* @param boolean Whether to merge the current styles with the new styles
*/
@@ -617,7 +617,7 @@ class GeSHi
/**
* Sets the styles for the line numbers.
- *
+ *
* @param string The style for the line numbers that are "normal"
* @param string|boolean If a string, this is the style of the line
* numbers that are "fancy", otherwise if boolean then this
@@ -644,19 +644,19 @@ class GeSHi
/**
* Sets whether line numbers should be displayed.
- *
+ *
* Valid values for the first parameter are:
- *
+ *
* <ul>
* <li><b>GESHI_NO_LINE_NUMBERS</b>: Line numbers will not be displayed</li>
* <li><b>GESHI_NORMAL_LINE_NUMBERS</b>: Line numbers will be displayed</li>
* <li><b>GESHI_FANCY_LINE_NUMBERS</b>: 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.
- *
+ *
* @param int How line numbers should be displayed
* @param int Defines which lines are fancy
* @since 1.0.0
@@ -675,7 +675,7 @@ class GeSHi
* 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
- *
+ *
* @param int The key of the keyword group to change the styles of
* @param string The style to make the keywords
* @param boolean Whether to merge the new styles with the old or just
@@ -693,7 +693,7 @@ class GeSHi
/**
* Turns highlighting on/off for a keyword group
- *
+ *
* @param int The key of the keyword group to turn on or off
* @param boolean Whether to turn highlighting for that group on or off
* @since 1.0.0
@@ -707,7 +707,7 @@ class GeSHi
* 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
- *
+ *
* @param int The key of the comment group to change the styles of
* @param string The style to make the comments
* @param boolean Whether to merge the new styles with the old or just
@@ -725,7 +725,7 @@ class GeSHi
/**
* Turns highlighting on/off for comment groups
- *
+ *
* @param int The key of the comment group to turn on or off
* @param boolean Whether to turn highlighting for that group on or off
* @since 1.0.0
@@ -739,7 +739,7 @@ class GeSHi
* 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
- *
+ *
* @param string The style to make the escape characters
* @param boolean Whether to merge the new styles with the old or just
* to overwrite them
@@ -756,7 +756,7 @@ class GeSHi
/**
* Turns highlighting on/off for escaped characters
- *
+ *
* @param boolean Whether to turn highlighting for escape characters on or off
* @since 1.0.0
*/
@@ -772,7 +772,7 @@ class GeSHi
*
* This method is DEPRECATED: use set_symbols_style instead.
* This method will be removed in 1.2.X
- *
+ *
* @param string The style to make the brackets
* @param boolean Whether to merge the new styles with the old or just
* to overwrite them
@@ -793,7 +793,7 @@ class GeSHi
*
* This method is DEPRECATED: use set_symbols_highlighting instead.
* This method will be remove in 1.2.X
- *
+ *
* @param boolean Whether to turn highlighting for brackets on or off
* @since 1.0.0
* @deprecated In favour of set_symbols_highlighting
@@ -807,7 +807,7 @@ class GeSHi
* 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
- *
+ *
* @param string The style to make the symbols
* @param boolean Whether to merge the new styles with the old or just
* to overwrite them
@@ -826,7 +826,7 @@ class GeSHi
/**
* Turns highlighting on/off for symbols
- *
+ *
* @param boolean Whether to turn highlighting for symbols on or off
* @since 1.0.0
*/
@@ -841,7 +841,7 @@ class GeSHi
* 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
- *
+ *
* @param string The style to make the escape characters
* @param boolean Whether to merge the new styles with the old or just
* to overwrite them
@@ -858,7 +858,7 @@ class GeSHi
/**
* Turns highlighting on/off for strings
- *
+ *
* @param boolean Whether to turn highlighting for strings on or off
* @since 1.0.0
*/
@@ -871,7 +871,7 @@ class GeSHi
* 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
- *
+ *
* @param string The style to make the numbers
* @param boolean Whether to merge the new styles with the old or just
* to overwrite them
@@ -888,7 +888,7 @@ class GeSHi
/**
* Turns highlighting on/off for numbers
- *
+ *
* @param boolean Whether to turn highlighting for numbers on or off
* @since 1.0.0
*/
@@ -903,7 +903,7 @@ class GeSHi
* 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
- *
+ *
* @param int The key of the object splitter to change the styles of
* @param string The style to make the methods
* @param boolean Whether to merge the new styles with the old or just
@@ -921,7 +921,7 @@ class GeSHi
/**
* Turns highlighting on/off for methods
- *
+ *
* @param boolean Whether to turn highlighting for methods on or off
* @since 1.0.0
*/
@@ -934,7 +934,7 @@ class GeSHi
* 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
- *
+ *
* @param string The style to make the regular expression matches
* @param boolean Whether to merge the new styles with the old or just
* to overwrite them
@@ -951,7 +951,7 @@ class GeSHi
/**
* Turns highlighting on/off for regexps
- *
+ *
* @param int The key of the regular expression group to turn on or off
* @param boolean Whether to turn highlighting for the regular expression group on or off
* @since 1.0.0
@@ -963,7 +963,7 @@ class GeSHi
/**
* Sets whether a set of keywords are checked for in a case sensitive manner
- *
+ *
* @param int The key of the keyword group to change the case sensitivity of
* @param boolean Whether to check in a case sensitive manner or not
* @since 1.0.0
@@ -975,13 +975,13 @@ class GeSHi
/**
* Sets the case that keywords should use when found. Use the constants:
- *
+ *
* <ul>
* <li><b>GESHI_CAPS_NO_CHANGE</b>: leave keywords as-is</li>
* <li><b>GESHI_CAPS_UPPER</b>: convert all keywords to uppercase where found</li>
* <li><b>GESHI_CAPS_LOWER</b>: convert all keywords to lowercase where found</li>
* </ul>
- *
+ *
* @param int A constant specifying what to do with matched keywords
* @since 1.0.1
* @todo Error check the passed value
@@ -993,9 +993,9 @@ class GeSHi
/**
* Sets how many spaces a tab is substituted for
- *
+ *
* Widths below zero are ignored
- *
+ *
* @param int The tab width
* @since 1.0.0
*/
@@ -1008,7 +1008,7 @@ class GeSHi
* 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.
- *
+ *
* @param boolean Whether to enable strict mode or not
* @since 1.0.0
*/
@@ -1021,7 +1021,7 @@ class GeSHi
/**
* Disables all highlighting
- *
+ *
* @since 1.0.0
* @todo Rewrite with an array traversal
*/
@@ -1042,7 +1042,7 @@ class GeSHi
/**
* Enables all highlighting
- *
+ *
* @since 1.0.0
* @todo Rewrite with array traversal
*/
@@ -1064,7 +1064,7 @@ class GeSHi
/**
* Given a file extension, this method returns either a valid geshi language
* name, or the empty string if it couldn't be found
- *
+ *
* @param string The extension to get a language name for
* @param array A lookup array to use instead of the default
* @since 1.0.5
@@ -1135,7 +1135,7 @@ class GeSHi
* 'lang_name' => array('extension', 'extension', ...),
* 'lang_name' ...
* );</pre>
- *
+ *
* @todo Complete rethink of this and above method
* @since 1.0.5
*/
@@ -1151,10 +1151,10 @@ class GeSHi
/**
* Adds a keyword to a keyword group for highlighting
- *
+ *
* @param int The key of the keyword group to add the keyword to
* @param string The word to add to the keyword group
- * @since 1.0.0
+ * @since 1.0.0
*/
function add_keyword ($key, $word)
{
@@ -1163,10 +1163,10 @@ class GeSHi
/**
* Removes a keyword from a keyword group
- *
+ *
* @param int The key of the keyword group to remove the keyword from
* @param string The word to remove from the keyword group
- * @since 1.0.0
+ * @since 1.0.0
*/
function remove_keyword ($key, $word)
{
@@ -1176,12 +1176,12 @@ class GeSHi
/**
* Creates a new keyword group
- *
+ *
* @param int The key of the keyword group to create
* @param string The styles for the keyword group
* @param boolean Whether the keyword group is case sensitive ornot
* @param array The words to use for the keyword group
- * @since 1.0.0
+ * @since 1.0.0
*/
function add_keyword_group ( $key, $styles, $case_sensitive = true, $words = array() )
{
@@ -1194,9 +1194,9 @@ class GeSHi
/**
* Removes a keyword group
- *
+ *
* @param int The key of the keyword group to remove
- * @since 1.0.0
+ * @since 1.0.0
*/
function remove_keyword_group ($key)
{
@@ -1208,7 +1208,7 @@ class GeSHi
/**
* Sets the content of the header block
- *
+ *
* @param string The content of the header block
* @since 1.0.2
*/
@@ -1219,7 +1219,7 @@ class GeSHi
/**
* Sets the content of the footer block
- *
+ *
* @param string The content of the footer block
* @since 1.0.2
*/
@@ -1230,7 +1230,7 @@ class GeSHi
/**
* Sets the style for the header content
- *
+ *
* @param string The style for the header content
* @since 1.0.2
*/
@@ -1241,7 +1241,7 @@ class GeSHi
/**
* Sets the style for the footer content
- *
+ *
* @param string The style for the footer content
* @since 1.0.2
*/
@@ -1252,7 +1252,7 @@ class GeSHi
/**
* Sets the base URL to be used for keywords
- *
+ *
* @param int The key of the keyword group to set the URL for
* @param string The URL to set for the group. If {FNAME} is in
* the url somewhere, it is replaced by the keyword
@@ -1266,7 +1266,7 @@ class GeSHi
/**
* Sets styles for links in code
- *
+ *
* @param int A constant that specifies what state the style is being
* set for - e.g. :hover or :visited
* @param string The styles to use for that state
@@ -1279,7 +1279,7 @@ class GeSHi
/**
* Sets the target for links in code
- *
+ *
* @param string The target for links in the code, e.g. _blank
* @since 1.0.3
*/
@@ -1294,7 +1294,7 @@ class GeSHi
/**
* Sets styles for important parts of the code
- *
+ *
* @param string The styles to use on important parts of the code
* @since 1.0.2
*/
@@ -1305,7 +1305,7 @@ class GeSHi
/**
* Sets whether context-important blocks are highlighted
- *
+ *
* @todo REMOVE THIS SHIZ FROM GESHI!
* @deprecated
*/
@@ -1316,7 +1316,7 @@ class GeSHi
/**
* Whether CSS IDs should be added to each line
- *
+ *
* @param boolean If true, IDs will be added to each line.
* @since 1.0.2
*/
@@ -1327,7 +1327,7 @@ class GeSHi
/**
* Specifies which lines to highlight extra
- *
+ *
* @param mixed An array of line numbers to highlight, or just a line
* number on its own.
* @since 1.0.2
@@ -1346,7 +1346,7 @@ class GeSHi
/**
* Sets the style for extra-highlighted lines
- *
+ *
* @param string The style for extra-highlighted lines
* @since 1.0.2
*/
@@ -1358,7 +1358,7 @@ class GeSHi
/**
* Sets what number line numbers should start at. Should
* be a positive integer, and will be converted to one.
- *
+ *
* <b>Warning:</b> Using this method will add the "start"
* attribute to the &lt;ol&gt; that is used for line numbering.
* This is <b>not</b> valid XHTML strict, so if that's what you
@@ -1366,7 +1366,7 @@ class GeSHi
* 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.
- *
+ *
* @param int The number to start line numbers at
* @since 1.0.2
*/
@@ -1378,7 +1378,7 @@ class GeSHi
/**
* Sets the encoding used for htmlspecialchars(), for international
* support.
- *
+ *
* @param string The encoding to use for the source
* @since 1.0.3
*/
@@ -1392,11 +1392,11 @@ class GeSHi
/**
* Returns the code in $this->source, highlighted and surrounded by the
* nessecary HTML.
- *
+ *
* 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
- *
+ *
* @since 1.0.0
*/
function parse_code ()
@@ -1706,7 +1706,7 @@ class GeSHi
$test_str .= "</span>";
}
// Take into account that the comment might be the last in the source
- if (!$oops) {
+ if (!$oops) {
$test_str .= "\n";
}
$i = $close_pos;
@@ -1779,7 +1779,7 @@ class GeSHi
/**
* Swaps out spaces and tabs for HTML indentation. Not needed if
* the code is in a pre block...
- *
+ *
* @param string The source to indent
* @return string The source with HTML indenting applied
* @since 1.0.0
@@ -1877,7 +1877,7 @@ class GeSHi
/**
* Changes the case of a keyword for those languages where a change is asked for
- *
+ *
* @param string The keyword to change the case of
* @return string The keyword with its case changed
* @since 1.0.0
@@ -1895,7 +1895,7 @@ class GeSHi
/**
* Adds a url to a keyword where needed.
- *
+ *
* @param string The keyword to add the URL HTML to
* @param int What group the keyword is from
* @param boolean Whether to get the HTML for the start or end
@@ -1934,7 +1934,7 @@ class GeSHi
/**
* Takes a string that has no strings or comments in it, and highlights
* stuff like keywords, numbers and methods.
- *
+ *
* @param string The string to parse for keyword, numbers etc.
* @since 1.0.0
* @access private
@@ -2124,7 +2124,7 @@ class GeSHi
/**
* Sets the time taken to parse the code
- *
+ *
* @param microtime The time when parsing started
* @param microtime The time when parsing ended
* @since 1.0.2
@@ -2139,7 +2139,7 @@ class GeSHi
/**
* Gets the time taken to parse the code
- *
+ *
* @return double The time taken to parse the code
* @since 1.0.2
*/
@@ -2150,7 +2150,7 @@ class GeSHi
/**
* Gets language information and stores it for later use
- *
+ *
* @access private
* @todo Needs to load keys for lexic permissions for keywords, regexps etc
*/
@@ -2184,7 +2184,7 @@ class GeSHi
/**
* Takes the parsed code and various options, and creates the HTML
* surrounding it to make it look nice.
- *
+ *
* @param string The code already parsed
* @return string The code nicely finalised
* @since 1.0.0
@@ -2199,12 +2199,12 @@ class GeSHi
(strstr($parsed_code, @htmlspecialchars(GESHI_START_IMPORTANT, ENT_COMPAT, $this->encoding)) === false)) {
$parsed_code = str_replace(@htmlspecialchars(GESHI_END_IMPORTANT, ENT_COMPAT, $this->encoding), '', $parsed_code);
}
-
+
// Add HTML whitespace stuff if we're using the <div> header
if ($this->header_type != GESHI_HEADER_PRE) {
$parsed_code = $this->indent($parsed_code);
}
-
+
// If we're using line numbers, we insert <li>s and appropriate
// markup to style them (otherwise we don't need to do anything)
if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) {
@@ -2247,7 +2247,7 @@ class GeSHi
$start = "<div$def_attr>";
$end = '</div>';
}
-
+
++$i;
// Are we supposed to use ids? If so, add them
if ($this->add_ids) {
@@ -2285,22 +2285,22 @@ class GeSHi
}
}
}
-
+
// purge some unnecessary stuff
$parsed_code = preg_replace('#<span[^>]+>(\s*)</span>#', '\\1', $parsed_code);
$parsed_code = preg_replace('#<div[^>]+>(\s*)</div>#', '\\1', $parsed_code);
-
+
if ($this->header_type == GESHI_HEADER_PRE) {
// enforce line numbers when using pre
$parsed_code = str_replace('<li></li>', '<li>&nbsp;</li>', $parsed_code);
}
-
+
return $this->header() . chop($parsed_code) . $this->footer();
}
/**
* Creates the header for the code block (with correct attributes)
- *
+ *
* @return string The header for the code block
* @since 1.0.0
* @access private
@@ -2325,7 +2325,7 @@ class GeSHi
}
return $header;
}
-
+
// Work out what to return and do it
if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) {
if ($this->header_type == GESHI_HEADER_PRE) {
@@ -2344,7 +2344,7 @@ class GeSHi
/**
* Returns the header content, formatted for output
- *
+ *
* @return string The header content, formatted for output
* @since 1.0.2
* @access private
@@ -2369,7 +2369,7 @@ class GeSHi
/**
* Returns the footer for the code block.
- *
+ *
* @return string The footer for the code block
* @since 1.0.0
* @access private
@@ -2382,7 +2382,7 @@ class GeSHi
return ($this->line_numbers != GESHI_NO_LINE_NUMBERS) ? '</ol>' . $footer_content
: $footer_content;
}
-
+
if ($this->header_type == GESHI_HEADER_DIV) {
if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) {
return "</ol>$footer_content</div>";
@@ -2398,7 +2398,7 @@ class GeSHi
/**
* Returns the footer content, formatted for output
- *
+ *
* @return string The footer content, formatted for output
* @since 1.0.2
* @access private
@@ -2424,7 +2424,7 @@ class GeSHi
/**
* Replaces certain keywords in the header and footer with
* certain configuration values
- *
+ *
* @param string The header or footer content to do replacement on
* @return string The header or footer with replaced keywords
* @since 1.0.2
@@ -2448,7 +2448,7 @@ class GeSHi
/**
* Gets the CSS attributes for this code
- *
+ *
* @return The CSS attributes for this code
* @since 1.0.0
* @access private
@@ -2476,7 +2476,7 @@ class GeSHi
* is true, we only return the stylesheet declarations that matter for
* this code block instead of the whole thing
*
- * @param boolean Whether to use economy mode or not
+ * @param boolean Whether to use economy mode or not
* @return string A stylesheet built on the data for the current language
* @since 1.0.0
*/
@@ -2621,7 +2621,7 @@ class GeSHi
if (!function_exists('geshi_highlight')) {
/**
* Easy way to highlight stuff. Behaves just like highlight_string
- *
+ *
* @param string The code to highlight
* @param string The language to highlight the code in
* @param string The path to the language files. You can leave this blank if you need
@@ -2645,4 +2645,4 @@ if (!function_exists('geshi_highlight')) {
}
}
-?>
+?> \ No newline at end of file