address-format
address-format copied to clipboard
Remove %n in front and back of string
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
@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.
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.
I'll be honest I haven't used this library or php for years, but it looks like the unit test is actually broken. The final
nis being trimmed off the address, which could mean that it is related to this change.
Sorry for the slow response, new dad here :)
You're right, I updated the PR and also added a test for this scenario 👍
Amazing thanks for all your work @jmslbam
@adamlc you're welcome! Thank you for the initial work of the package!