Skip to content

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

Merged
ankit--sethi merged 2 commits intoelastic:8.19from
ankit--sethi:backport/dangling-spaces-8.19
May 1, 2025
Merged

Remove dangling spaces wherever found. (#127475)#127612
ankit--sethi merged 2 commits intoelastic:8.19from
ankit--sethi:backport/dangling-spaces-8.19

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ć <slobodanadamovic@users.noreply.github.com>

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

Co-authored-by: Slobodan Adamović <slobodanadamovic@users.noreply.github.com>

* correctly reference issue

* Update docs/changelog/127475.yaml

---------

Co-authored-by: Slobodan Adamović <slobodanadamovic@users.noreply.github.com>

(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

1 participant