Skip to content
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

Error when parsing "\" literals #2

Open
Cohedrin opened this issue Apr 16, 2016 · 0 comments
Open

Error when parsing "\" literals #2

Cohedrin opened this issue Apr 16, 2016 · 0 comments

Comments

@Cohedrin
Copy link

When parsing vdf files that contain \ literals, their escaped versions are currently replaced with the " character, as seen here: https://github.com/skadistats/vdf4r/blob/master/lib/vdf4r/parser.rb#L13.

Is there a specific reason that this is the case, rather than the backslash character(\)? We've had a few problems come up from doing this, such as when parsing files such as this (I've gisted it as its quite long.)

The problematic line is line 4.

This will raise enter during multi-line value from here.

The entire format is an auto generated file from CS:GO's built in backup system, including the problematic portions.

Replacing " with \ in the Parser#clean method seems to solve the issue, but I'd like to get some feedback on if this has the posiblity of conflicting with something else.

I can provide more examples of this error if need be, just let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant