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

Strange behaviour with backslash followed by curly braces #94

Closed
seanamosw opened this issue Aug 14, 2017 · 4 comments
Closed

Strange behaviour with backslash followed by curly braces #94

seanamosw opened this issue Aug 14, 2017 · 4 comments
Labels

Comments

@seanamosw
Copy link

I am getting an unexpected result when the following format and settings are used.

var formatter = Smart.CreateDefaultSmartFormat();
formatter.Settings.ConvertCharacterStringLiterals = false;

var result = formatter.Format("\\{Test}", new { Test = "Hello" });

Expected Result: Hello
Actual Result: {Test

@seanamosw seanamosw changed the title Strange behaviour with backslash followed by curl braces Strange behaviour with backslash followed by curly braces Aug 14, 2017
@seanamosw
Copy link
Author

I've confirmed rolling back to 2.0.0 has the correct output

@axunonb axunonb added the Bug label Aug 15, 2017
@axunonb
Copy link
Member

axunonb commented Aug 15, 2017

For the actual result you are also using formatter.Parser.UseAlternativeEscapeChar(), right?

axunonb added a commit that referenced this issue Aug 15, 2017
@axunonb
Copy link
Member

axunonb commented Aug 15, 2017

Expected result should read \Hello instead of Hello

@axunonb axunonb closed this as completed Aug 15, 2017
@seanamosw
Copy link
Author

My mistake, you are right the expected output should be \Hello.
Thank you for the quick resolution.

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