webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Classes | |
class | NoMatchingRuleException |
class | Rule |
class | HyperLanguage |
class | HyperlightCompiledLanguage |
class | Hyperlight |
Namespaces | |
hyperlight | |
Functions | |
if(!function_exists('array_peek')) | dump ($obj, $descr=null) |
hyperlight ($code, $lang, $tag='pre', array $attributes=array()) | |
hyperlight_file ($filename, $lang=null, $tag='pre', array $attributes=array()) | |
if(defined('HYPERLIGHT_SHORTCUT')) | hyperlight_calculate_fold_marks ($code, $lang) |
hyperlight_apply_fold_marks ($code, array $fold_marks) | |
if (!function_exists( 'array_peek')) dump | ( | $obj, | |
$descr = null |
|||
) |
echos a highlighted code.
For example, the following hyperlight('<?php echo \'Hello, world\'; ?>', 'php');
results in:
...
string | $code | The code. |
string | $lang | The language of the code. |
string | $tag | The surrounding tag to use. Optional. |
array | $attributes | Attributes to decorate $tag with. If no tag is given, this argument can be passed in its place. This behaviour will be assumed if the third argument is an array. Attributes must be given as a hash of key value pairs. |
hyperlight_apply_fold_marks | ( | $code, | |
array | $fold_marks | ||
) |
if (defined( 'HYPERLIGHT_SHORTCUT')) hyperlight_calculate_fold_marks | ( | $code, | |
$lang | |||
) |
Is the same as: hyperlight(file_get_contents($filename), $lang, $tag, $attributes);