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

Modification to syntax.js parser RegEx to provide better Unicode support #4390

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions dev/script/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ setupDevNginx() {

target="$ROOT_DIR/dev/nginx-mappings.yml"

sed -e "s/@IMAGE-ORIGIN-BUCKET/$imageOriginBucket/g" \
sudo sed -e "s/@IMAGE-ORIGIN-BUCKET/$imageOriginBucket/g" \
-e "s/@IMAGE-BUCKET/$imagesBucket/g" \
-e "s/@DOMAIN_ROOT/$DOMAIN/g" \
"$ROOT_DIR/dev/nginx-mappings.yml.template" > "$target"

dev-nginx setup-app "$target"
sudo dev-nginx setup-app "$target"
}

setupPanDomainConfiguration() {
Expand Down Expand Up @@ -336,6 +336,7 @@ main() {
setupQuotasConfiguration
setupUsagesData
setupUsageRightsConfiguration
echo "*** Setup Nginx ***"
setupDevNginx
generateConfig
uploadApiKey
Expand Down
2 changes: 1 addition & 1 deletion kahuna/public/js/search/structured-query/syntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {getLabel, getCollection} from '../../search-query/query-syntax';

// Line too long for eslint, but can't break it down..
/*eslint-disable max-len */
const parserRe = /(-?)(?:(?:([a-zA-Z@><]+):|(#)|(~))(?:([^ "']+)|"([^"]+)"|'([^']+)')|([a-zA-Z0-9]+)|"([^"]*)"|'([^']*)')/g;
const parserRe = /(-?)(?:(?:([\p{L}@><]+):|(#)|(~))(?:([^ "']+)|"([^"]+)"|'([^']+)')|([\p{L}0-9]+)|"([^"]*)"|'([^']*)')/gu;
/*eslint-enable max-len */
const falsyValuesToEmptyString = (value) => {
if (!value){
Expand Down
Loading