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

Remove duplicate whiespace from item titles when displaying in list/head #1237

Merged

Conversation

dennisschagt
Copy link
Member

Fixes #1227.

This only removes duplicate spaces when displaying titles.
It might make sense to remove duplicate whitespaces on a lower level (e.g. in getters like title()/get_title() or even when retrieving titles in Cache) but I'm not sure it is a good idea.

@coveralls
Copy link

coveralls commented Oct 20, 2020

Coverage Status

Coverage decreased (-0.01%) to 57.299% when pulling d9ae8a3 on dennisschagt:feature/consolidate-title-whitespace into e4f2812 on newsboat:master.

@Minoru
Copy link
Member

Minoru commented Oct 20, 2020

There's definitely a reason to do it at a lower level: filters. If filters see multiple spaces where views only show one, the filters might not work and it'll be very confusing to the user. I think Cache is a bit too low, though; let's do it in the RssItem then?

Thanks for taking care of this, by the way. I keep getting distracted lately and haven't even finished the PRs I myself submitted :(

@dennisschagt dennisschagt force-pushed the feature/consolidate-title-whitespace branch from faf9436 to 961642b Compare October 20, 2020 20:58
Copy link
Member

@Minoru Minoru left a comment

Choose a reason for hiding this comment

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

Can we have a test for this please? :P

@dennisschagt
Copy link
Member Author

Sure, I expect to have time later this week.

Copy link
Member

@Minoru Minoru left a comment

Choose a reason for hiding this comment

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

Thank you! 👍

@Minoru Minoru merged commit fba9376 into newsboat:master Oct 23, 2020
@dennisschagt dennisschagt deleted the feature/consolidate-title-whitespace branch October 23, 2020 18:37
@Minoru Minoru added this to the 2.22 milestone Dec 21, 2020
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.

Itemlist doesn't squash consecutive spaces into one
3 participants