Closed tpikonen closed 3 years ago
Adding a squash_whitespace_except_linefeeds
function for descriptions would allow titles to continue using the current squash_whitespace
.
Ok, I rewrote the patch. This adds function squash_whitespace_not_nl() which is used for descriptions.
I don't know why, but this patch also fixes URL highlighting in gpodder descriptions. Thanks!
Merged, thanks
Currently episode descriptions are stripped of newlines with squash_whitespace(). This makes longer descriptions unreadable in gpodder. This patch modifies squash_whitespace() to squash only whitespace other than newlines.
Note that squash_whitespace() is also used for the title, where removing newlines might make more sense. Should the titles perhaps be handled separately?
The second commit uses raw Pythons strings in regexps consistently, as is the recommendation. This fixes a few DeprecationWarnings in tests.