mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
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:
@@ -168,8 +168,10 @@ function highlight_script($code) {
|
||||
$ret .= "<span class='hl-comment'>" . $matches[0] . "</span>";
|
||||
} else if (preg_match("@^([-+*/=!.\@^]|<|>)+|^:=@",$code, $matches)) {
|
||||
$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>";
|
||||
} else if (preg_match("@^[{}]@",$code, $matches)) {
|
||||
$ret .= "<span class='hl-fun-paren'>" . $matches[0] . "</span>";
|
||||
if ($matches[0] == '{') $string .= 'b';
|
||||
elseif ($matches[0] == '}') $string = substr($string,0,-1);
|
||||
} else if (preg_match("@^[a-zA-Z_][a-zA-Z0-9_]*:@",$code, $matches)) {
|
||||
|
||||
Reference in New Issue
Block a user