artasparks / glift

Go Lightweight Frontend
MIT License
115 stars 33 forks source link

The tag "MULTIGO" #79

Closed varenius closed 9 years ago

varenius commented 9 years ago

I came across a game transcribed on KGS from 2011 where the SGF file begins like this: "(;GM[1]FF[4]CA[UTF-8]AP[CGoban:3]ST[2] RU[Japanese]SZ[19]KM[6.50] PW[Juri Kuronen]PB[Weiying Sörlin]WR[5d]BR[5d]DT[2011-01-16]EV[Jusandan]RO[4]PC[The KGS Go Server at http://www.gokgs.com/]C[Fredda [-]: Det partiet som avgjorde Jusandan! ]MULTIGOGM[1] ;B[pp] ;W[dd] ;B[dq] ;W[qd] ..."

The tag "MULTIGOGM[1]" was not liked at all by Glift, but I figured I could just change it to GM[1], i.e. remove the MULTIGO-part and it worked. I don't know this tag, I tried to check quickly in http://www.red-bean.com/sgf/ but did not find it there. Perhaps it is KGS-specific? Anyhow, it would be nice if Glift could treat it "correctly", which I don't know exactly what it means, or say it is not supported, or just re-write it removing the "MULTIGO"-part as I did manually for the file.

artasparks commented 9 years ago

Fixed in 1.0.1

Ah, I see. I have an explicit check against properties longer than length 2. I have removed this check -- it looks like the SGF spec allows arbitrary length properties:

propIdent  = UcLetter { UcLetter }

Now, glift will dump out a bunch of warnings to the JS error console, but it will functionally ignore the unknown properties.