-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
fix: emit attribute with escaped quote and backslash #445
fix: emit attribute with escaped quote and backslash #445
Conversation
Thanks! Are there other escape characters we need to be mindful of as well? |
I'd appreciate you adding a unit test here. FlatSharp.Compiler.UnitTests is the correct project. |
Thank you for your review. |
@jamescourtney Please review again, process backslash and double quote, some unit tests added😊 |
Thanks for your efforts here! I'm a little perplexed that flatc doesn't handle this for me, since it is the grammar parser after all. In any case, I'll take a look later today and hopefully approve. |
FYI,the string readed from flatc parser is converted from an escaped string in fbs file to the original string. When we generate C# code with a string literal, we need to convert the original string back to an escaped string. |
The fbs below cannot be compiled because of unescaped double quotes.
This PR fixes it.