minor tweak of website syntax highlighter

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1033 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-02 15:27:08 +00:00
parent 6f8c1d1484
commit fb411139d1
@@ -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)) {