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

GH1547: Fix issue with parsing escaped curly braces in FormatParser #1863

Merged
merged 1 commit into from
Oct 7, 2017

Conversation

kcamp
Copy link
Contributor

@kcamp kcamp commented Oct 6, 2017

This addresses the issues described in GH-1547 regarding escaping curlies.

As detailed in the original issue, testing this fix uncovered an additional bug (inconsistency with string.Format implementation)

The one thing that I think this exposes is a bug in the LiteralToken that is being returned for escaped curlies
Information("{{}} {0}", 123); outputs "{{}} 123"
@DixonDs is right in that this should probably output {} 123 to be consistent with expectations, namely the implementation of string.Format. I have adjusted the parser to return a single '{' or '}' in those cases and updated the tests to match.

Copy link
Member

@devlead devlead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@devlead devlead merged commit ea7a13a into cake-build:develop Oct 7, 2017
@devlead
Copy link
Member

devlead commented Oct 7, 2017

@kcamp your changes have been merged, thanks for your contribution 👍

@kcamp kcamp deleted the GH-1547 branch October 10, 2017 12:37
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

Successfully merging this pull request may close these issues.

3 participants