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

Escape curly braces #2

Merged
merged 2 commits into from
Apr 26, 2024
Merged

Escape curly braces #2

merged 2 commits into from
Apr 26, 2024

Conversation

windupbird144
Copy link
Contributor

Addresses #1 - This commit allows using double curly braces to log {{ single braces { in the function call syntax.

logger.debug("This logs {{single}} curly braces.");

This logs {single} curly braces.

Copy link

codecov bot commented Apr 26, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

Copy link
Owner

@dahlia dahlia left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

Could you add an entry for this change in the CHANGES.md?

assertEquals(
parseMessageTemplate("Hello, {{world}}!", { foo: 123 }),
["Hello, {world}!"],
);
Copy link
Owner

Choose a reason for hiding this comment

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

Could you add a test for unpaired curly bracket?

assertEquals(
  parseMessageTemplate("Hello, {{world!", { foo: 123 }),
  ["Hello, {world!"],
);

@windupbird144
Copy link
Contributor Author

Thanks for your review. I added the test and entry in the changelog file. Unpaired single curly brackets are not handled in this commit, as they aren't handled in the current implementation either.

Copy link
Owner

@dahlia dahlia left a comment

Choose a reason for hiding this comment

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

Thanks!

@dahlia dahlia merged commit ccb2a2e into dahlia:main Apr 26, 2024
6 checks passed
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.

2 participants