Fixed problem with parser and castle with numeric values 0-0 instead of the correct O-O

This commit is contained in:
Alf Magne Kalleland
2013-02-12 01:25:18 +01:00
parent b437127f6b
commit f00ceee0bb
3 changed files with 77 additions and 1 deletions

View File

@@ -39,6 +39,8 @@ class PgnParser
$c = preg_replace("/([^\]])(\n+)\[/si", "$1\n\n[", $c);
$c = preg_replace("/\n{3,}/s", "\n\n", $c);
$c = str_replace("-SB-", "[", $c);
$c = str_replace("0-0-0", "O-O-O", $c);
$c = str_replace("0-0", "O-O", $c);
return $c;
}