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

Trailing slash in Indian addresses #114

Closed
rkoeze opened this issue Sep 29, 2024 · 2 comments
Closed

Trailing slash in Indian addresses #114

rkoeze opened this issue Sep 29, 2024 · 2 comments

Comments

@rkoeze
Copy link
Contributor

rkoeze commented Sep 29, 2024

Hi folks,

First of all, thanks for maintaining this project! It's greatly appreciated.

I maintain the java implementation and was recently made aware of the following case: when Indian address parts contain a city but not a postcode the result will include a trailing slash. So for instance:

country_code: 'IN',
road: 'Baner',
city: 'Pune',
state: 'Maharashtra',
country: 'India',

Will be formatted as this:

Baner
Pune -
Maharashtra
India

I'm not 100% sure what is the correct output here, but I suspect that the trailing slash should be removed in this case. Is that correct? If so, would it make sense to contain a rule in the postformat_replace field for this case or do something like this:

{{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}} {{#postcode}} - {{{postcode}}} {{/postcode}} 

I've confirmed that this also occurs in at least one other implementation.

@freyfogle
Copy link
Member

Thanks for the bug report. Will create a test case and come back to you in next day or so.

freyfogle added a commit that referenced this issue Sep 30, 2024
Trailing dash in Indian addresses without a postcode
@freyfogle
Copy link
Member

this is now solved, thanks again for making us aware.

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

No branches or pull requests

2 participants