Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

[Feature Request] ignore parentheses #1195

Closed
fedexman opened this issue Jan 1, 2021 · 2 comments · Fixed by #1199
Closed

[Feature Request] ignore parentheses #1195

fedexman opened this issue Jan 1, 2021 · 2 comments · Fixed by #1199

Comments

@fedexman
Copy link

fedexman commented Jan 1, 2021

Hello, i had an idea while using netflix. Often a website or netflix subtitles use parentheses instead of furigana : e.g " なんかあったら 遠慮(えんりょ)なく言(い)いなさい "
Having an option that ignore the parentheses so we can search 言いなさい will be useful because currently yomichan will block at 言 and willn't make the link with いんさい.
Thank for developing this extension that I use every day ! I hope my explanation is understandable 😄

@toasted-nutbread
Copy link
Collaborator

toasted-nutbread commented Jan 3, 2021

I've run into this same issue before as well. I've added support for this with a new feature that supports generic pattern replacement using regular expressions in #1199.

Patterns can be configured under the Translation > Configure custom text replacement patterns… popup window on the v2 settings page (Advanced must be enabled). Pattern for your case: [(]([^)]*)[)]

Note that you may need to increase the value of the Text scan length setting to catch longer words, as the removal of characters will shorten the input.

@fedexman
Copy link
Author

fedexman commented Jan 3, 2021

Ok thanks ! It seems very powerful even for another problems, i'll wait the next update to test it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants