hydrusnetwork / hydrusnetwork/hydrus

Option to toggle strict class name matching in parser

Open
#352 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request system:downloading
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.