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

Add additional slurs configuration option. Closes #1464. #1612

Merged
merged 2 commits into from
May 26, 2021

Conversation

ba1ash
Copy link
Contributor

@ba1ash ba1ash commented May 20, 2021

Greetings!
Implemented #1464.
Without a test :( I don't know how to test this gracefully. I don't like the idea of config file modification at runtime. Maybe it's okay to fill in additional_slurs option by default with some slurs and rely on them in test.
If someone has a suggestion about the proper test implementation I will be happy to implement it :)

It is possible to additional regex for slurs filtering.
It can be done through `additional_slurs` option in config file.
@ba1ash ba1ash force-pushed the feature/1464-additional-slurs branch from 9e78f9c to 07e5640 Compare May 20, 2021 19:26
@ba1ash ba1ash changed the title Add additional slurs configuration option. Implements #1464. Add additional slurs configuration option. Closes #1464. May 22, 2021
@dessalines
Copy link
Member

Sry I've been slow on this, I'll get to it shortly.

Comment on lines +93 to +96
# additional_slurs:
# '''
# (\bThis\b)|(\bis\b)|(\bsample\b)
# '''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heredoc makes sense here I think, although hjson might be able to handle everything after the : fine.

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks! I'll let nutomic also go over it.

@dessalines dessalines requested a review from Nutomic May 26, 2021 01:36
@Nutomic Nutomic merged commit 7008848 into LemmyNet:main May 26, 2021
@Nutomic
Copy link
Member

Nutomic commented May 26, 2021

Thanks @ba1ash!

@ba1ash ba1ash deleted the feature/1464-additional-slurs branch May 26, 2021 20:42
Nutomic pushed a commit that referenced this pull request Jul 30, 2021
* Actualize a comment about config initialization

* Add additional slurs functionality.

It is possible to additional regex for slurs filtering.
It can be done through `additional_slurs` option in config file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants