-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fixes hashtags that use non-English characters. #7556
Conversation
app/src/main/java/org/schabi/newpipe/util/external_communication/TextLinkifier.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/util/external_communication/TextLinkifier.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/util/external_communication/TextLinkifier.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have tests for this regex? If not, we should create a few.
@TobiGr I thought about it at first too because we don't currently have them and this seems easily testable. But the code combines recognizing the hashtags (or links) and applying the onClickListeners to the UI making it very hard to add tests. I would not put the burden on a first timer The failed pipeline is not related to this change |
@XiangRongLin I thought more of basic unit tests to ensure the regex is working as expected. Not more. But if you think this should be done in a separate PR, that's not a problem at all. |
@TobiGr I don't know really anything about unit testing so I would prefer not to. |
@XiangRongLin I'm sorry, I found some problems with this solution and want to commit a solution that is much more accurate to how hashtags work. Should I commit here or close this PR and open a new one? Once again I am sorry, as this is my first time committing to a public repo and I don't really know how it works. |
No, commit here and force-push if needed. If needed, we will squash your commits if we merge this PR.
According to your comment, I am converting this PR to draft. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is it?
Description of the changes in your PR
Fixes hashtags that use non-English characters. Hashtags would now include any character above Unicode value U+007F . This solves problems of hashtags with accented characters as well as hashtags in other languages.
Before/After Screenshots/Screen Record
Before:
After:
Fixes the following issue(s)
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.
Due diligence