@lvce-editor/extension-search-view 7.27.0 → 7.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2748,11 +2748,12 @@ const handleInputWithContext = async (context, value, inputSource = User, cursor
|
|
|
2748
2748
|
|
|
2749
2749
|
const RE_WHITESPACE_SEQUENCE = /\s+/;
|
|
2750
2750
|
const addFilter = (searchValue, filter) => {
|
|
2751
|
-
const
|
|
2751
|
+
const trimmedValue = searchValue.trim();
|
|
2752
|
+
const values = trimmedValue.split(RE_WHITESPACE_SEQUENCE);
|
|
2752
2753
|
if (values.includes(filter)) {
|
|
2753
2754
|
return searchValue;
|
|
2754
2755
|
}
|
|
2755
|
-
return `${
|
|
2756
|
+
return `${trimmedValue} ${filter}`.trim();
|
|
2756
2757
|
};
|
|
2757
2758
|
const filterByValueWithContext = async (context, filter) => {
|
|
2758
2759
|
const {
|