mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Adds comment explaining logic following the split on empty string in splitFilterIntoTerms
This commit is contained in:
@@ -14,6 +14,10 @@ export default [function() {
|
|||||||
let groups = [];
|
let groups = [];
|
||||||
let quoted;
|
let quoted;
|
||||||
|
|
||||||
|
// This split _may_ split search terms down the middle
|
||||||
|
// ex) searchString=ansible_facts.some_other_thing:"foo foobar" ansible_facts.some_thing:"foobar"
|
||||||
|
// would result in 3 different substring's but only two search terms
|
||||||
|
// This logic handles that scenario with the `quoted` variable
|
||||||
searchString.split(' ').forEach(substring => {
|
searchString.split(' ').forEach(substring => {
|
||||||
if (/:"/g.test(substring)) {
|
if (/:"/g.test(substring)) {
|
||||||
if (/"$/.test(substring)) {
|
if (/"$/.test(substring)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user