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

Fixed bug in Processor class - it unexpectedly strips the final TextEdit in some cases #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RRagnar
Copy link

@RRagnar RRagnar commented Nov 12, 2020

…lement in case if consists only of one character.

assertEquals(
Pattern(
TextElement("Hi "),
Placeable(expression = StringLiteral("")),
Copy link
Contributor

Choose a reason for hiding this comment

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

This expression here shouldn't pop up, and indicates a bug. I'm not sure that it's a bug in this patch, though.

Copy link
Author

Choose a reason for hiding this comment

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

yes, it's another issue. I had to post-process a pattern to remove the redundant empty string literals in my app after this escaping.

Copy link
Author

Choose a reason for hiding this comment

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

I've created the issue for this #49

@zbraniecki
Copy link
Collaborator

Hi @RRagnar Thank you for the PR! I'm comfortable merging it but in order to not lose track of the bug that @Pike pointed out - can you please file a follow up issue and reference it from the comment by this test to indicate that this is an extraneous empty placeable and should be fixed?

Then I think it'll be ready to merge.

@gueroJeff
Copy link

@zbraniecki Looks like RRagnar created the issue here: #49

TextElement("!")
)
)

Copy link
Collaborator

Choose a reason for hiding this comment

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

@gueroJeff @RRagnar Thank you! Can you please add an inline comment in the PR, like this:

Suggested change
// The superfluous empty string literal is a bug. See #49.

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.

4 participants