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

Remove %n in front and back of string #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmslbam
Copy link

@jmslbam jmslbam commented Sep 15, 2024

So if RECIPIENT or ORGANIZATION are not filled or empty, then this results in only a STREET_ADDRESS that's prefix with an %n which will be replace by a <br> which results in an address that's starts a line lower then needed.

Fixes #23

So if `RECIPIENT` or `ORGANIZATION` are not filled or empty, then this results in only a `STREET_ADDRESS` that's prefix with an `%n` which will be replace by a `<br>` which results in an address that's starts a line lower then needed.

Fixes adamlc#23
Copy link
Owner

@adamlc adamlc 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 PR!

It looks like the tests are now failing. Would you mind updating them please?

@jmslbam
Copy link
Author

jmslbam commented Sep 16, 2024

@adamlc, Ah yes I see that now. As it's not related to the scope of this issue, shall I update them in a different branch so those can be merged first before proceding with this PR's.

The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/

Looks like we be needing actions/checkout@v4.

@adamlc
Copy link
Owner

adamlc commented Sep 17, 2024

I'll be honest I haven't used this library or php for years, but it looks like the unit test is actually broken.

1) FormatTest::testDeAddressFormat
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 'Eberhard Wellhausen\n
 Wittekindshof\n
 Schulstrasse 4\n
-32547 Oyenhause'
+32547 Oyenhausen'

The final n is being trimmed off the address, which could mean that it is related to this change.

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.

Don't prepend <br> if Recipient and or Organisation are empty
2 participants