Commit Graph

4 Commits

Author SHA1 Message Date
Elliot Winkler 0e2d40a3e1 word_wrap: Add ability to indent wrapped text 2015-12-13 20:22:21 -07:00
Elliot Winkler 6b9f22a92f Fix word_wrap so it doesn't loop forever
The word_wrap method was getting stuck on "words" that were too long to be
wrapped, such as the following:

    This is a line ThisisalinethatwillneverbewrappedThisisalinethatwillneverbewrappedThisisalinethatwillneverbewrapped This is another line

Now, the method will properly skip these words and will not try to wrap
them.
2015-12-13 20:22:21 -07:00
Elliot Winkler a0b6cb2581 Fix word_wrap not to break at max line length
...but *after* the max line length.
2015-12-08 23:30:45 -07:00
Elliot Winkler f67183ea59 Improve the word_wrap utility method
We use the word_wrap method right now to reformat warning messages so
that they fit within a 72-character space. We'd like to use this for
error messages too, but we want the word_wrap method to be smart when
reformatting bulleted or numbered lists, and also to ignore code blocks.
2015-10-08 21:30:41 -06:00