oreillymedia/HTMLBook — pull request #81 by sandersk (2013-09-05 16:31:39+00:00)
Title: Added support for extra <div class="border-box"> in figure postprocessing

This pull request adds support for the functionality described in #80.

If a `

` has a `
`, then all `

` content except the `
` will get wrapped in `

` as shown here:

````html

This could be a figure caption

````

If a `

` has no `
`, no `

` will be added.

HTML5 mandates that the optional `
` element must come at either the beginning or end of the `

` element. However, should invalid HTML5 get passed through the XSL stylesheets, where there's a `
` in the middle, like this:

````html

Tarsiers are cute. Here are two of them

````

Then the XSL will throw a warning message and skip adding the `

`

All this functionality is controlled by a new parameter called $figure.border.div, which is turned on by default. If you don't want the `

` to be added to any `

` under any cirmcumstances, you can turn this parameter off.