-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for more unquoted characters and inline empty blocks #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR will certainly resolve that specific case, but its probably best to add $
as part of the character class. We also need unit tests for this.
Moved the changes to the character set and updated the weird unquoted character test case. Also extended support for other missing characters in unquoted keys and values:
Also added support for inline empty blocks directly after keys, and a corresponding test case, e.g.:
( |
CSGO has material (.vmt) files that have unquoted keys starting with $. For example, csgo/materials/grass/hr_grass/grass_a.vmt: ``` LightmappedGeneric { $baseTexture "grass/hr_grass/grass_a" $bumpmap "grass/hr_grass/grass_a_normals" } ``` This fixes the parsing of these files.
For example, file "csgo\materials\models\props_c17\furniturewooddresser001a.vmt" has these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good. Happy to merge after the comments are addressed.
It would be interesting to see how much of these testcases are covered: https://github.com/SteamDatabase/ValveKeyValue/tree/master/ValveKeyValue/ValveKeyValue.Test/Test%20Data/Text
CSGO has material (.vmt) files that have unquoted keys starting with $.
For example, csgo/materials/grass/hr_grass/grass_a.vmt:
This fixes the parsing of these files.