Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[bug THE-1329] : la recherche avec dates ne fonctionnait plus ( = il … #87

Merged
merged 1 commit into from
May 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,21 @@ private Query buildQuery(String chaine) {
private String replaceSpacesOutsideQuotes(String input) {
StringBuilder result = new StringBuilder();
boolean insideQuotes = false;
boolean insideBrackets = false;

for (int i = 0; i < input.length(); i++) {
char c = input.charAt(i);

if (c == '"') {
insideQuotes = !insideQuotes;
result.append(c);
} else if (c == ' ' && !insideQuotes) {
} else if (c == '[') {
insideBrackets = true;
result.append(c);
} else if (c == ']') {
insideBrackets = false;
result.append(c);
} else if (c == ' ' && !insideQuotes && !insideBrackets) {
result.append(" AND ");
} else {
result.append(c);
Expand Down
Loading