Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed WML parser not properly handling unquoted keys with variables (f…
…ixes #1236) In cases such as `name=turn $var`, the key value would get parsed and serialized as `turn$var`. The reason for this was that that string was broken down into 3 tokens: "turn", "$", and "var". parser::parse_variable() handled these tokens, and the issue was that "$" was considered a "misc" token instead of a string one. In cases where two string tokens were added consecutively, a space would be added between them (manually added spacing was not preserved). Since "$" did not count as a string, the space was not added, which resulted in "turn$var". To fix that, I made the tokenizer consider "$" a string token, so the spacing is correctly preserved. For the record, despite what the bug report above says, wrapping the value in quotes did work in lieu of this fix.
- Loading branch information