whiskyechobravo / kerko

A web application component that provides a faceted search interface for bibliographies managed with Zotero.
https://whiskyechobravo.github.io/kerko/
GNU General Public License v3.0
302 stars 36 forks source link

Add support for capturing group in tag inclusion. #21

Closed mgao6767 closed 2 days ago

mgao6767 commented 10 months ago

This PR allows the use of capturing group when using regular expression to determine item inclusion by tags. If tag_include_re contains capturing group, the tags will be the concatenation of captured substrings.

For example:

The changes pass all tests. Works as expected.

davidlesieur commented 10 months ago

Sounds like a useful feature, will review it! Even though the tests pass, one should not rely on them too much when working on extractors, as there are currently no specific tests for covering the extractors. Of course you are welcome to write tests for this extractor, should you feel inclined to. :wink: