Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix exception wrapping blank line in index (#587)
For normal wrapping, the blank line is taken as a paragraph so is not itself wrapped. However, because indexes have been formatted into single whole lines, they are wrapped one line at a time. This accidentally included wrapping the blank lines. The wrapping routine hadn't been written to expect wrapping an empty string. 1. In lower wrapping routine, deal with an empty paragraph without raising an exception. 2. In upper index wrapping routine, only wrap lines that have text Finally, while testing, I found an independent bug (of mine) which probably wouldn't occur in RL. I made a small index by deleting most of the lines from the example supplied, which left some page marks at the start of the closing `I/` line. It then failed to recognize this as the end of the index, and said "no match for opening `/I`". Fixed.
- Loading branch information