-
Notifications
You must be signed in to change notification settings - Fork 864
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
Remove excessive punctuation as part of distraction settings #4673
Remove excessive punctuation as part of distraction settings #4673
Conversation
src/renderer/helpers/utils.js
Outdated
return title.replace(reg, x => capitalizedWord(x.toLowerCase())) | ||
return title | ||
.replaceAll(/!{2,}/g, '!') | ||
.replaceAll(/[!?|]{2,}/g, '?') |
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.
Why [!?|]{2,}
not \?{2,}
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.
To deal with strings like TITLE???!??!!!!!?
If you only matched ?
and !
separately you would end up with TITLE?!?!?
rather than TITLE?
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.
/[!?]{2,}/g
is enough (without|
)- Please provide test case (video) for title with
?!?!?
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.
Co-authored-by: PikachuEXE <git@pikachuexe.net>
Head branch was pushed to by a user without write access
…lin/FreeTube into Excessive-Punctuation
Head branch was pushed to by a user without write access
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.
Thanks it works great
…-user-playlist-2 * development: (66 commits) Translated using Weblate (Portuguese (Brazil)) Translated using Weblate (Czech) Translated using Weblate (Hungarian) Translated using Weblate (Estonian) Translated using Weblate (Turkish) Translated using Weblate (Spanish) Translated using Weblate (Arabic) Translated using Weblate (Italian) Translated using Weblate (Polish) Translated using Weblate (French) Translated using Weblate (Chinese (Traditional)) Translated using Weblate (Chinese (Simplified)) Fix overflow issue with share playlist icon drop-down (FreeTubeApp#4677) Fix the Invidious DASH manifest generation (FreeTubeApp#4672) Hide channel sidebar label under `more` when setting is enabled (FreeTubeApp#4678) Translated using Weblate (Norwegian Nynorsk) Translated using Weblate (Serbian) Remove excessive punctuation as part of distraction settings (FreeTubeApp#4673) Bump the stylelint group with 1 update (FreeTubeApp#4669) Bump swiper from 11.0.5 to 11.0.6 (FreeTubeApp#4670) ... # Conflicts: # src/renderer/components/playlist-info/playlist-info.scss
Would like to have a way to see the original title before any DeArrowing of the title if possible, essentially: #3900 |
Title
Pull Request Type
Related issue
close #4268
Description
Filters out excessive use of punctuation consisting of ! and ? if you have the capitalization setting already enabled
Screenshots
Setting ON:
Setting OFF:
Testing
gothanchess
gothanchess what am I
for example of?!?!
Desktop
Additional context