On 19/08/11 02:42, Will wrote:
Hi,
I've found that tables rendered with the style 'asciidoc' generates
invalid markup when applying a cell style such as emphasis. The cell
content is rendered with a<div> wrapped around it, and then the cell
style wraps a<p> & an<em> around that, resulting in a<div> nested
within an<em> (and a<p>). This is occurring with asciidoc 8.6.5
under win xp sp3.
For example:
.Test table
[cols="1,1",options="header,autowidth",style="asciidoc"]
|==========================================
|Col. 1 |Col. 2
|1.0~ e|2011
|==========================================
You are correct, it does generate invalid HTML.
The workaround is to drop the 'e' cell style and used AsciiDoc markup to achieve
the same result (this is probably a more idiomatic approach given that the
column has been styled to use AsciiDoc markup):
.Test table
[cols="1,1",options="header,autowidth",style="asciidoc"]
|==========================================
|Col. 1 |Col. 2
|1.0~ |'2011'
|==========================================
There are situations where valid AsciiDoc will generate invalid output markup --
see
http://www.methods.co.nz/asciidoc/faq.html#_asciidoc_sometimes_generates_invalid_output_markup_why
Cheers, Stuart
Gives the following when rendered as xhtml:
<table rules="all"
frame="border"
cellspacing="0" cellpadding="4">
<caption class="title">Table 1. Test table</caption>
<col />
<col />
<thead>
<tr>
<th align="left" valign="top"><div class="paragraph"><p>Col. 1</p></
div></th>
<th align="left" valign="top"><div class="paragraph"><p>Col. 2</p></
div></th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top"><div><div class="paragraph"><p>1.0~</p></
div></div></td>
<td align="left" valign="top"><p class="table"><em><div
class="paragraph"><p>2011</p></div></em></p></td>
</tr>
</tbody>
</table>
Cheers,
Will
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.