-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix same Kanji character not being replaced twice #10
Fix same Kanji character not being replaced twice #10
Conversation
Some of the kanji characters that were once furiganized are matched again to the current regular expression. This fix will make sure that Kanji characters in <ruby> tags will not be replaced. To do so, a modification is made to the regular expression for the search.
Sort tagged array in order to add furigana for the longer Kanji series first.
Enable toggle ON/OFF of the function to give priority to consecutive Kanji characters from options_uit.
To add an option to avoid splitting consecutive Kanji characters,
The example sentences used for testing are as follows:
This relates #9 |
Oh my God thanks for your PR and hard working! I'm investigating and testing your PR currently. And add more example sentences for test:
|
The result is much better than I've expected before, I even want to make this option enable by default... But I guess I must be calm down and be patient, test it for a period before making it enabled by default. Actually, I'm still a little worried about the reliability of RegExp Thanks for your contribution again! |
@kuanyui Thank you for your
If you encounter any problems with the regular expression in question, please let me know. |
Some of the kanji characters that were once furiganized
are matched again to the current regular expression.
This fix will make sure that Kanji characters in
tags will not be replaced.
To do so, a modification is made to the
regular expression for the search.
This relates #9