Commit 78d5637c authored by twanvl's avatar twanvl

minor tweak of website syntax highlighter

parent 696792b6
...@@ -168,8 +168,10 @@ function highlight_script($code) { ...@@ -168,8 +168,10 @@ function highlight_script($code) {
$ret .= "<span class='hl-comment'>" . $matches[0] . "</span>"; $ret .= "<span class='hl-comment'>" . $matches[0] . "</span>";
} else if (preg_match("@^([-+*/=!.\@^]|&lt;|&gt;)+|^:=@",$code, $matches)) { } else if (preg_match("@^([-+*/=!.\@^]|&lt;|&gt;)+|^:=@",$code, $matches)) {
$ret .= "<span class='hl-op'>" . $matches[0] . "</span>"; $ret .= "<span class='hl-op'>" . $matches[0] . "</span>";
} else if (preg_match("@^([}]|[\\(\\)\\[\\]{,]+)@",$code, $matches)) { } else if (preg_match("@^([\\(\\)\\[\\],]+)@",$code, $matches)) {
$ret .= "<span class='hl-paren'>" . $matches[0] . "</span>"; $ret .= "<span class='hl-paren'>" . $matches[0] . "</span>";
} else if (preg_match("@^[{}]@",$code, $matches)) {
$ret .= "<span class='hl-fun-paren'>" . $matches[0] . "</span>";
if ($matches[0] == '{') $string .= 'b'; if ($matches[0] == '{') $string .= 'b';
elseif ($matches[0] == '}') $string = substr($string,0,-1); elseif ($matches[0] == '}') $string = substr($string,0,-1);
} else if (preg_match("@^[a-zA-Z_][a-zA-Z0-9_]*:@",$code, $matches)) { } else if (preg_match("@^[a-zA-Z_][a-zA-Z0-9_]*:@",$code, $matches)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment