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

When exporting FGD, it now using escape sequences? #35

Open
ozxybox opened this issue Nov 7, 2024 · 3 comments
Open

When exporting FGD, it now using escape sequences? #35

ozxybox opened this issue Nov 7, 2024 · 3 comments
Labels

Comments

@ozxybox
Copy link
Contributor

ozxybox commented Nov 7, 2024

It seems like as of the latest srctools, single quotes are now being escaped, regardless of the fact that they are within double quotes. Not sure if this is intended? I believe I accidentally added support for escape sequences to Strata's FGD parser, but I don't think believe stock FGD supports escape sequences? Regardless, I'm unsure if this is desirable given that the single quote is within a double quote

image

@TeamSpen210
Copy link
Owner

TeamSpen210 commented Nov 7, 2024

Ah yeah. It's sorta intended. I was checking to see whether KV2 did escape sequences, and found this utilbuffer.cpp code in the 2013 SDK, which escapes those plus others. I guess FGDs use "TokenReader" which is very dumb and only supports \n anyway. Parsing is so inconsistent... :(

@ozxybox
Copy link
Contributor Author

ozxybox commented Nov 7, 2024

Source engine! This sort of stuff drives me actually crazy HAHA
I really do wish it was just consistent everywhere…

@TeamSpen210
Copy link
Owner

I guess I need yet another flag in Tokenizer then. Hmm, or maybe let you pass a set of escapes to allow_escapes.

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

No branches or pull requests

2 participants