erebor/asciidoctor — pull request #17 by mojavelinux (2012-12-16 10:10:01+00:00)
Title: Chomp and cleanup

Trailing endlines in blocks and paragraphs are removed w/ precision; meaning only remove the endline if it has no semantic value. Doing so also allows the output markup to be cleaner.

I also realized that all the tests were working on lines that had no trailing endlines because the lines were created using split("\n") rather than lines.entries. It's important to use lines.entries because that matches the behavior of reading lines from a file. This change didn't require any change to tests because of the trailing endlines fix.

The trailing endline was affecting the calculation of the required length of the line characters in a two-line heading. I fixed that and added tests around this calculation.

The :quote symbol in the block content method switch got misplaced during merged, but the test didn't pick it up. I fixed the problem and fixed the test.

Finally, I cleaned out the commented-out templates at the bottom of the built-in template file.