aiannacc/goko-dominion-tools — pull request #15 by amalloy (2014-04-24 08:11:00+00:00)
Title: Make log-prettifier handle players with $ in their name

I've seen complaints on the forum that the end-of-game summary doesn't work right for players with `$` in their names. I noticed this myself in [a recent game](http://www.gokosalvager.com/static/logprettifier.html?/20140424/log.516d31dbe4b082c74d7b3391.1398325121201.txt), and decided to have a look. It seems to me like you're [treating the player name as a regular expression](https://github.com/aiannacc/goko-dominion-tools/blob/master/web/static/logprettifier.html#L545) with String.search - if you use String.indexOf instead, it searches for the string literal rather than treating it as a regex.

Tried it out by editing the javascript in-place, and this addresses all the problems I could see with the game I linked: opponent's turns are formatted correctly, he appears in the sidebar, and the end-game summary+graph both include him.