Skip to content
Snippets Groups Projects
Commit 3d644f3d authored by Henrik Askjer's avatar Henrik Askjer
Browse files

Merge branch 'hotfix-wildcard-search' into 'prod'

add percent wildcard symbol

See merge request spraksamlingane/beta.ordbok.uib.no!95
parents 51e45722 bb5dd227
No related branches found
Tags release_2021-11-18_2
No related merge requests found
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
var search = 0 var search = 0
if (this.items[0]) { if (this.items[0]) {
if (this.items[0].time < time) { if (this.items[0].time < time) {
if (/_|\*|\|/.test(q)) { if (/[_*%|]/.test(q)) {
search = 2 search = 2
} }
// Whitespace necessary in case option already exists in dropdown // Whitespace necessary in case option already exists in dropdown
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
let suggestions = response.data.a.w.map(item => ({q: q, match: item[0], label: item[0], time: time, lang: item[1]})) let suggestions = response.data.a.w.map(item => ({q: q, match: item[0], label: item[0], time: time, lang: item[1]}))
if (/_|\*|\|/.test(q)) { if (/[_*%|]/.test(q)) {
suggestions.unshift({q: q, label: q, time: time, search: 2}) suggestions.unshift({q: q, label: q, time: time, search: 2})
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment