erebor/asciidoctor — pull request #50 by mojavelinux (2013-01-03 12:49:35+00:00)
Title: Add DocBook backend templates + loads of improvements

While creating the DocBook templates, I stumbled over a ton of necessary improvements. I'm crossing my fingers that you don't need me to split up this commit because it took so long already just to get everything integrated, tested and working.

The highlight here is the built-in docbook backend and the refactoring of the built-in templates so that they're names don't conflict.

Here's the full list of changes (from what I could recall):

- make templates for docbook45 backend
- move backend templates to backends/ folder
- load backend templates lazily (based on backend attribute)
- namespace backend templates to avoid conflicts
- extend backend templates from a base template
- add view property to template class
- change InlineLink to InlineAnchor and assign type (:link or :xref)
- simplify shorthand methods (e.g., define attribute) in template classes
- set default backend to html5
- set backend attribute family (backend-*, basebackend, etc)
- set docdate and doctime attributes (match local* w/o file ref)
- prevent Reader from overriding attributes passed to Document.new
- fix list continuation bug in outline and labeled lists
- fold first paragraph properly in outline lists; document in TomDoc
- add convenience methods to String (trim, nuke)
- add TomDoc to methods added to String
- add tests for String monkeypatches
- fix compliance of attribute continuations in Reader
- perform attribute substitutions on document attributes and attribute lists
- apply normal subs to single-quoted attribute values
- cleanup how substitutions are called
- don't need Asciidoctor:: prefix in Substituter
- honor line pass: macro in document attribute value
- move regexs in Reader to Asciidoctor module
- use %r{} syntax to make some regex easier to read
- fix order of replacements
- add ellipsis and single quote replacements
- add space, quot and apos to instrinsics
- move Substituters mixin to AbstractBlock
- make Document an AbstractBlock
- use blocks instance variable in Document instead of elements
- document should store text of reference to match how docbook works
- allow Document.new to be called w/ no arguments
- rename level* regex to section*
- loads of tests to verify numerous compliance checks and for new functionality
- more TomDoc