c2d7fa / muwrap

Unixy program for wrapping comments and text in shell scripts.
MIT License
0 stars 0 forks source link

Support rewrapping comments that already have multiple lines #1

Open c2d7fa opened 4 years ago

c2d7fa commented 4 years ago

For example, this comment:

# This is an example of a rater long comment. It is surely at least 80 characters long, and in fact I dare say
# that it is substrantially longer than even those 80 characters that I just mentioned.

Should be wrapped to the following:

# This is an example of a rater long comment. It is surely at least 80 characters
# long, and in fact I dare say that it is substrantially longer than even those
# 80 characters that I just mentioned.

This operation is equivalent to joining the comment to a single line, removing the comment prefix and then just wrapping that line.

c2d7fa commented 4 years ago

Commit f24383c implements this for text. We need special handling for comments.