sopel-irc / sopel-github

GitHub plugin for Sopel
Other
3 stars 13 forks source link

formatting: improve comment body shortener #105

Closed dgw closed 2 years ago

dgw commented 2 years ago

This eliminates the weird split between callers that handle an empty comment body themselves (in github.py) and callers that just blindly pass the comment body into fmt_short_comment_body and take whatever comes back.

Now, everyone expects fmt_short_comment_body() to do something sensible, even if the comment is empty or consists only of skippable lines (headers, comments, quotes).