Life In 19x19 http://prod.lifein19x19.com/ |
|
Go Diagram after SGF problem. http://prod.lifein19x19.com/viewtopic.php?f=14&t=3183 |
Page 1 of 1 |
Author: | Dusk Eagle [ Fri Feb 11, 2011 8:31 pm ] |
Post subject: | Go Diagram after SGF problem. |
It seems that when a user pastes an sgf onto the forum, and that sgf contains [*go*] (minus the *), any go diagrams after that post won't be parsed properly. As an example, here is a post from Chew where this occurs: Chew Terr wrote: I would appreciate a look at the opening of this game, if the offer's still open? It's something a bit different than my normal (Kobayashi) fuseki, and was actually my first game in a few weeks. ");
[go]$$B Moves 1 to 8 $$ +---------------------------------------+ $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . 6 . . . . . | $$ | . . . 2 . . . . . , . . . . . 1 . . . | $$ | . . 8 . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . 7 . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . , . . . . . , . . . . . , . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . 3 , . . . . . , . . . . . 4 . . . | $$ | . . . . . . . . . 5 . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ +---------------------------------------+'; var displayText = ""; var originalDisplayText = ""; if (myVal.length > 0) { myVal = myVal.replace(/ /g, "%0D%0A"); var lineArray = myVal.split("%0D%0A"); var dollarIndex = lineArray[0].indexOf("$$"); if (dollarIndex >= 0) { var spaceIndex = lineArray[0].indexOf(" ", dollarIndex); if (spaceIndex > 0) { displayText = lineArray[0].substring(spaceIndex); originalDisplayText = displayText; displayText = displayText.replace(/\n/g, " "); } } if (originalDisplayText != "") { myVal = myVal.replace(originalDisplayText, ""); } myVal = myVal.replace(/\s+/g, '%20'); myVal = myVal.replace(/#+/g, '%23'); myVal = myVal.replace(/&+/g, '%26'); myVal = myVal.replace(/\++/g, '%2B'); myVal = myVal.replace(/\/+/g, '%2F'); myVal = myVal.replace(/'%'+/g, '%25'); myVal = myVal.replace(/:+/g, '%3A'); myVal = myVal.replace(/;+/g, '%3B'); myVal = myVal.replace(/<+/g, '%3C'); myVal = myVal.replace(/>+/g, '%3E'); myVal = myVal.replace(/\?+/g, '%3F'); myVal = myVal.replace(/\'+/g, '%27'); myVal = myVal.replace(/\"+/g, '%22'); } document.write(""); [go]$$B Moves 1 to 8 $$ +---------------------------------------+ $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . 6 . . . . . | $$ | . . . 2 . . . . . , . . . . . 1 . . . | $$ | . . 8 . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . 7 . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . , . . . . . , . . . . . , . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . 3 , . . . . . , . . . . . 4 . . . | $$ | . . . . . . . . . 5 . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ | . . . . . . . . . . . . . . . . . . . | $$ +---------------------------------------+[/go] Gah, I had that diagram working a minute ago. Does anyone see what I messed up on the diagram? Mods, if you do, feel free to edit this to fix it. |
Author: | Jordus [ Fri Feb 11, 2011 10:39 pm ] |
Post subject: | Re: Go Diagram after SGF problem. |
hmmm interesting... you can fix it by adding Code: [/go] before the [/sgf] like this : [/go][/sgf] your original post (with the fix in it): Quote: It seems that when a user pastes an sgf onto the forum, and that sgf contains [*go*] (minus the *), any go diagrams after that post won't be parsed properly. As an example, here is a post from Chew where this occurs: Chew Terr wrote: I would appreciate a look at the opening of this game, if the offer's still open? It's something a bit different than my normal (Kobayashi) fuseki, and was actually my first game in a few weeks. ");
').replace('http://lifein19x19.com', 'https://lifein19x19.com').replace('http://www.lifein19x19.com', 'https://www.lifein19x19.com') + " Gah, I had that diagram working a minute ago. Does anyone see what I messed up on the diagram? Mods, if you do, feel free to edit this to fix it. as for an auto fix... I'll have to look into it... |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |