Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements Brave-specific filter options `tag` and `explicitcancel` #9

Merged
merged 2 commits into from May 9, 2019

Conversation

@AndriusA
Copy link
Collaborator

AndriusA commented May 9, 2019

Modifies the engine API to accommodate both options:

  • Engine uses builder pattern to choose which tags should be used
  • Result structure exposes additional boolean field explicit_cancel to signal when a filter with the option set matches
AndriusA added 2 commits May 9, 2019
To enable rules with a set of tags, you first create an instance of the blocker engine, then add tags:

```
...
let blocker = Engine::from_rules(&rules);
engine.with_tags(&["social", "embeds"]);
```

Closes #3
Returns `explicit_cancel` as a boolean property in the blocker result structure, set to `true` if filter found with no matching exception and the filter specificies `explicitcancel` option.

Closes #8
@bbondy
bbondy approved these changes May 9, 2019
@AndriusA AndriusA merged commit 033722e into master May 9, 2019
@AndriusA AndriusA deleted the feature-tags branch May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.