hydrusnetwork / hydrusnetwork/hydrus
Option to toggle strict class name matching in parser
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.2k
- Forks
- 207
- PR merge metrics
- No merged PRs in 30d
Description
This request concerns the parser functionality of Hydrus where multi-value properties such as class have multiple values in a string. This behavior is not found in other properties as its likely due to how the selector/parser handles class selection.
Example
<a class="a b" href="/" > Link </a>
Current Behavior
Content parsers finds a match of the example a tag above if the key-value filter is set to class="a". This is an often desired behavior of parsers and enables tag selection with mixed static and dynamic class names to allow matching a subset of a tag's classes.
Desired Feature/Behavior
Content parsers should have an option to toggle strict/exact matching for class names to allow for strict matching such that the above example matches only with class="a b" and not class="a". This is useful is cases such as parsing tags from pages.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating Hydrus's content parser implementation and the existing class key-value matching behavior. Confirm how a strict-matching option would be configured, then add coverage for class="a b" versus class="a"; done means strict mode rejects subset matches while the current default behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100