Hi!
Would you consider making it possible to specify a custom test function for SearchCursor
to the SearchQuery
config?
In Heynote I use custom syntax to divide the buffer into blocks. This syntax is hidden and replaced by block widgets. I use the custom test function both to make sure that searching can’t match this syntax, and also to make it possible to limit the search within the current block.
Here’s a draft PR with the changes: Add test and regexpTest functions to SearchQuery config by heyman · Pull Request #18 · codemirror/search · GitHub
I’ve currently forked the search package into Heynote, but this change would make it possible to reuse code from the search package instead.