asciidoctor/asciidoctor — pull request #174 by mojavelinux (2013-02-12 08:40:09+00:00)
Title: Resolve #83 and #143, refactor Reader

Process attribute entries and preprocessor directives when parsing.

- move processing of all lines into parser so the logic is contextual
- add preprocessing mode to Reader for handling preprocessing directives
- record attribute assignments below header and playback during rendering
- parse document header in distinct parsing step
- strip whitespace from end of all lines
- remove unnecessary trailing whitespace match from line regular expressions
- use chomp instead of rstrip when checking for blank lines
- improve/optimize several of the regular expressions
- add support for multiple attributes in ifdef and ifndef
- add very constrained version of ifeval for comparing attribute values
- support nested includes (by way of flattening source)
- preliminary support for tracking line numbers (don't expect much yet)
- move hard-coded english captions into attributes
- add option to stop parsing document after header
- add convenience methods to Document for author and revdate
- rename several methods on Reader for readability
- add multiple-line support to peek_lines
- if the caption attribute exists on document, it should disable automatic captions
- add automatic caption for listing block (if listing-caption attribute is assigned)
- fix a list bug where it was not treating certain wrapped lines as text
- add check for attribute entry in list handling code
- optimizations
- TomDoc
- tests!