Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmdparse.rb: fix a nil.sub bug (gettalong#3)
When we have to format a word that is longer than the available space, `paragraph.slice!(pattern)` will return nil. This case should be detected by the `until` (and it is then correctly handed) but unfortunately there is a `sub` call after the `slice!` which will error out before. Fix this by only calling the `sub` if the result is not nil.
- Loading branch information