Skip to content

Remove dangling spaces wherever found. (#127475) #127612

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

Merged

Conversation

ankit--sethi
Copy link
Contributor

Backport
This will backport the following commits from main to 8.17:

#127475

* Remove dandling spaces wherever found.

This PR addresses elastic#117067 , a report about unexpected spaces breaking message parsers built by customers. I used the regex `(\. \")(?![A-Z(a-z_0-9-;<%\/\.+ \t\n]+)` to detect such instances and clean up. In one case, a minor code improvement helps add optional spaces as necessary for a multi-sentence error message.

* fix test

* Update docs/changelog/127475.yaml

* correct logic

* fix test

* fix tests

* fix tests

* fix tests

* Update docs/changelog/127475.yaml

* Update x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/action/TransportGetInferenceModelAction.java

Co-authored-by: Slobodan Adamović <[email protected]>

* Update libs/x-content/src/main/java/org/elasticsearch/xcontent/ObjectParser.java

Co-authored-by: Slobodan Adamović <[email protected]>

* correctly reference issue

* Update docs/changelog/127475.yaml

---------

Co-authored-by: Slobodan Adamović <[email protected]>

(cherry picked from commit 94854b3)
@ankit--sethi ankit--sethi enabled auto-merge (squash) May 1, 2025 19:04
@ankit--sethi ankit--sethi disabled auto-merge May 1, 2025 19:04
@ankit--sethi ankit--sethi merged commit ddf1943 into elastic:8.19 May 1, 2025
15 checks passed
@ankit--sethi ankit--sethi deleted the backport/dangling-spaces-8.19 branch May 1, 2025 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant