Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/PHP5.3/Highlight.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class Highlight
private static $show_line_number = false;

private static $body = '';
private static $default = '#000000';
private static $cast = '#038C8C';
private static $null = '#0000FF';
private static $bool = '#D8C300';
Expand Down Expand Up @@ -384,8 +385,9 @@ private static function format($code, $file_name, $cache)
$new_code .= '<tr class="last-map"><td></td><td></td></tr>';
$new_code = str_replace(array('\"', '\\\'', ' '), array('"', '\'', '&nbsp;&nbsp;'), $new_code);

$default_color = 'color:' . self::$default;
$style = '.strip font,.strip span{color:inherit !important;all:initial !important;all:unset !important}';
$pretty = '<table style="' . self::$body .'">'. $new_code . '</table><style>' . $style . '</style>';
$pretty = '<table style="' . self::$body . $default_color . '">'. $new_code . '</table><style>' . $style . '</style>';

if ($cache)
{
Expand Down
33 changes: 29 additions & 4 deletions src/PHP5.3/theme.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
{
"fastdev": {
"body": { "background": "#282c34", "width": "100%" },
"default": {"color": "edb83d"},
"keywords": { "color": "#edb83d"},
"cast": { "color": "#038C8C" },
"null": { "color": "#FF5D38" },
"bool": { "color": "#FF5D38" },
"self": { "color": "#FF5D38" },
"quote": { "color": "#FFFFFF" },
"class": { "color": "#edb83d" },
"parent": { "color": "#edb83d" },
"number": { "color": "#edb83d" },
"comment": { "color": "#6e7a94", "font-style": "italic" },
"tag_open": { "color": "#F00000" },
"function": { "color": "#FF464E", "font-style": "bold" },
"variable": { "color": "#FF464E" },
"constant": { "color": "#0F255E" },
"tag_close": { "color": "#F00000" },
"operators": { "color": "#FFFFFF" },
"semi_colon": { "color": "#dee3ec" },
"parenthesis": { "color": "#FFFFFF" },
"return_type": { "color": "#FE648A" },
"php_function": { "color": "#edb83d" },
"curly_braces": { "color": "#dee3ec" },
"parameter_type": { "color": "#E3093F" },
"square_bracket": { "color": "#edb83d" },
"custom_function": { "color": "#edb83d" },
"multi_line_comment": { "color": "#6e7a94", "font-style": "italic" }
},
"bittr": {
"body": { "background": "#2b303b", "width": "100%" },
"keywords": { "color": "#26A6A6"},
Expand Down Expand Up @@ -233,7 +262,3 @@
"multi_line_comment": { "color": "#969896", "font-style": "italic" }
}
}




4 changes: 3 additions & 1 deletion src/PHP7.0/Highlight.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class Highlight
private static $show_line_number = false;

private static $body = '';
private static $default = '#000000';
private static $cast = '#038C8C';
private static $null = '#0000FF';
private static $bool = '#D8C300';
Expand Down Expand Up @@ -383,8 +384,9 @@ private static function format(string $code, string $file_name, bool $cache): st
$new_code .= '<tr class="last-map"><td></td><td></td></tr>';
$new_code = str_replace(['\"', '\\\'', ' '], ['"', '\'', '&nbsp;&nbsp;'], $new_code);

$default_color = 'color:' . self::$default;
$style = '.strip font,.strip span{color:inherit !important;all:initial !important;all:unset !important}';
$pretty = '<table style="' . self::$body .'">'. $new_code . '</table><style>' . $style . '</style>';
$pretty = '<table style="' . self::$body . $default_color . '">'. $new_code . '</table><style>' . $style . '</style>';

if ($cache)
{
Expand Down
33 changes: 29 additions & 4 deletions src/PHP7.0/theme.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
{
"fastdev": {
"body": { "background": "#282c34", "width": "100%" },
"default": {"color": "edb83d"},
"keywords": { "color": "#edb83d"},
"cast": { "color": "#038C8C" },
"null": { "color": "#FF5D38" },
"bool": { "color": "#FF5D38" },
"self": { "color": "#FF5D38" },
"quote": { "color": "#FFFFFF" },
"class": { "color": "#edb83d" },
"parent": { "color": "#edb83d" },
"number": { "color": "#edb83d" },
"comment": { "color": "#6e7a94", "font-style": "italic" },
"tag_open": { "color": "#F00000" },
"function": { "color": "#FF464E", "font-style": "bold" },
"variable": { "color": "#FF464E" },
"constant": { "color": "#0F255E" },
"tag_close": { "color": "#F00000" },
"operators": { "color": "#FFFFFF" },
"semi_colon": { "color": "#dee3ec" },
"parenthesis": { "color": "#FFFFFF" },
"return_type": { "color": "#FE648A" },
"php_function": { "color": "#edb83d" },
"curly_braces": { "color": "#dee3ec" },
"parameter_type": { "color": "#E3093F" },
"square_bracket": { "color": "#edb83d" },
"custom_function": { "color": "#edb83d" },
"multi_line_comment": { "color": "#6e7a94", "font-style": "italic" }
},
"bittr": {
"body": { "background": "#2b303b", "width": "100%" },
"keywords": { "color": "#26A6A6"},
Expand Down Expand Up @@ -233,7 +262,3 @@
"multi_line_comment": { "color": "#969896", "font-style": "italic" }
}
}