Please add pattern to collection filter.
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
I found that view_filters supports pattern, but filter does not. Can filter also support pattern?
ex:
```
collections:
- name: 'blog'
label: 'Blog'
folder: 'content/blog'
...
filter:
field: 'body'
pattern: '\S+'
fields:
...
view_filters:
- label: 'Post date'
field: 'date'
pattern: '\S+'
```
When I use the pattern in view_filters, it works, but it doesn't work in the filter.
Contributor guide
Research direction
Start by tracing how collection filter configuration is handled and compare it with the existing view_filters pattern handling. Reproduce the provided collection configuration, then verify that a filter with pattern '\S+' applies correctly to matching content and that the behavior remains covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100