File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -2880,8 +2880,13 @@ and end-of-string meta-characters."
2880
2880
2881
2881
(defun lsp-glob-to-regexps (glob-pattern)
2882
2882
"Convert a GLOB-PATTERN to a list of Elisp regexps."
2883
- (let* ((trimmed-pattern (string-trim glob-pattern))
2884
- (top-level-unbraced-patterns (lsp-glob-unbrace-at-top-level trimmed-pattern)))
2883
+ (when-let*
2884
+ ((glob-pattern (cond ((hash-table-p glob-pattern)
2885
+ (ht-get glob-pattern "pattern"))
2886
+ ((stringp glob-pattern) glob-pattern)
2887
+ (t (error "Unknown glob-pattern type: %s" glob-pattern))))
2888
+ (trimmed-pattern (string-trim glob-pattern))
2889
+ (top-level-unbraced-patterns (lsp-glob-unbrace-at-top-level trimmed-pattern)))
2885
2890
(seq-map #'lsp-glob-convert-to-wrapped-regexp
2886
2891
top-level-unbraced-patterns)))
2887
2892
You can’t perform that action at this time.
0 commit comments