Story of the Four Quotes""""
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Story of the Four Quotes""""
Not sure if crashing the game with invalid WML is considered to be a bug, so not sure what to do, just wanted to report somehow.
First, i figured out that "" is the valid way to insert quote mark into a string.
Then, i figured out that it works at the beginning or at the end of the string as well:
That's it for the story so far.
Then, due to annoying auto-completion in my text editor, i made a typo:
And, trying to parse this, the game ran out of memory and got killed by the OOM killer
Took a while for me to find the typo. Probably a warning message could be useful.
Happened on both 1.10 and 1.11.
First, i figured out that "" is the valid way to insert quote mark into a string.
Code: Select all
[story]
[part]
story= _ "And Delfador said: ""Hey, now I know how to insert quotes! That's awesome!"" ..."
[/part]
[/story]
Code: Select all
[story]
[part]
story= _ """Yay, I can even quote the whole thing with this!"""
[/part]
[/story]
Then, due to annoying auto-completion in my text editor, i made a typo:
Code: Select all
[story]
[part]
story= _ """"Gonna try to use more of this now."""
[/part]
[/story]
Took a while for me to find the typo. Probably a warning message could be useful.
Happened on both 1.10 and 1.11.
The Flight of Drakes, Only Death Behind, ??? (not yet sure how the third part will be called).
Re: Story of the Four Quotes""""
Invalid WML crashing the game is a bug. Invalid WML crashing your machine? Well...NoQ wrote:And, trying to parse this, the game ran out of memory and got killed by the OOM killer
Took a while for me to find the typo. Probably a warning message could be useful.
Of course this is a bug, and it would be nice if you could report it in the tracker (per ReportingBugs) with more detailed information and a minimal test case. I appear to be unable to reproduce it on 1.11.15+dev, but that probably just means I’m missing something.
Note that if you need to insert a straight quote in contexts that accept Pango markup like [message] and [part], you should also be able to use
"
for that purpose:Code: Select all
[message]
speaker=narrator
message=""Yay.""
[/message]
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Re: Story of the Four Quotes""""
In English text, typographical quotation marks (U+201C LEFT DOUBLE QUOTATION MARK and U+201D RIGHT DOUBLE QUOTATION MARK) can also be used:
These have the comparative advantages of being (a) more legible than
Code: Select all
[message]
speaker=narrator
message= _ "“Hurrah.”"
[/message]
"
and (b) not part of WML syntax, so they shouldn’t be able to crash the game (and, (c) the proper thing for English text).