-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 'veselov-13': support block table col style
Add support for AsciiDoc "a" operator block-level table styling, which supports block elements in a table cell by internally nesting a separate document. Thanks to @veselov for contributing this fix. Closes both <#13> and <#1>. See <#14>.
- Loading branch information
Showing
6 changed files
with
199 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<div id="toc" class="toc"> | ||
<div id="toctitle">Table of Contents</div> | ||
<p><span class="toc-root"><a href="table-block-operator.html">TOP</a></span></p><ul class="sectlevel1"> | ||
<li><a href="_second.html">SECOND</a> | ||
<ul class="sectlevel2"> | ||
<li><a href="_oops.html"><span class="toc-current">OOPS</span></a> | ||
</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="sect2"> | ||
<h3 id="_oops">OOPS</h3> | ||
<div class="sect3"> | ||
<h4 id="_danger">DANGER</h4> | ||
<div class="paragraph"> | ||
<p>This tests the use of the AsciiDoc "a" block-level styling for a single cell.</p> | ||
</div> | ||
<table class="tableblock frame-all grid-all stretch"> | ||
<colgroup> | ||
<col style="width: 50%;"> | ||
<col style="width: 50%;"> | ||
</colgroup> | ||
<tbody> | ||
<tr> | ||
<td class="tableblock halign-left valign-top"><p class="tableblock">abc.${ext}</p></td> | ||
<td class="tableblock halign-left valign-top"><div class="content"><div class="ulist"> | ||
<ul> | ||
<li> | ||
<p>item</p> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="ulist"> | ||
<ul> | ||
</ul> | ||
</div> | ||
<div class="paragraph nav-footer"> | ||
<p></p> | ||
</div></div></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<div class="paragraph"> | ||
<p>The following table from the | ||
<a href="https://docs.asciidoctor.org/asciidoc/latest/tables/format-column-content/#use-asciidoc-block-elements-in-a-column">AsciiDoc | ||
Language Documentation</a> uses the "a" operator for the entire first column.</p> | ||
</div> | ||
<table class="tableblock frame-all grid-all stretch"> | ||
<colgroup> | ||
<col style="width: 50%;"> | ||
<col style="width: 50%;"> | ||
</colgroup> | ||
<thead> | ||
<tr> | ||
<th class="tableblock halign-left valign-top">Column with the <code>a</code> style operator applied to its specifier</th> | ||
<th class="tableblock halign-left valign-top">Column using the default style</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td class="tableblock halign-left valign-top"><div class="content"><div class="ulist"> | ||
<ul> | ||
<li> | ||
<p>List item 1</p> | ||
</li> | ||
<li> | ||
<p>List item 2</p> | ||
</li> | ||
<li> | ||
<p>List item 3</p> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="ulist"> | ||
<ul> | ||
</ul> | ||
</div> | ||
<div class="paragraph nav-footer"> | ||
<p></p> | ||
</div></div></td> | ||
<td class="tableblock halign-left valign-top"><p class="tableblock">* List item 1 | ||
* List item 2 | ||
* List item 3</p></td> | ||
</tr> | ||
<tr> | ||
<td class="tableblock halign-left valign-top"><div class="content"><div class="listingblock"> | ||
<div class="content"> | ||
<pre class="highlight"><code class="language-python" data-lang="python">import os | ||
print "%s" %(os.uname())</code></pre> | ||
</div> | ||
</div> | ||
<div class="ulist"> | ||
<ul> | ||
</ul> | ||
</div> | ||
<div class="paragraph nav-footer"> | ||
<p></p> | ||
</div></div></td> | ||
<td class="tableblock halign-left valign-top"><p class="tableblock">[source,python] | ||
---- | ||
import os | ||
print ("%s" %(os.uname())) | ||
----</p></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
<div class="paragraph nav-footer"> | ||
<p>↑ Up: <a href="_second.html">SECOND</a> | ⌂ Home: <a href="table-block-operator.html">TOP</a></p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div id="toc" class="toc"> | ||
<div id="toctitle">Table of Contents</div> | ||
<p><span class="toc-root"><a href="table-block-operator.html">TOP</a></span></p> | ||
</div> | ||
<div class="sect1"> | ||
<h2 id="_second">SECOND</h2> | ||
<div class="sectionbody"> | ||
<div class="ulist"> | ||
<ul> | ||
<li> | ||
<p><a href="_oops.html">OOPS</a></p> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="paragraph nav-footer"> | ||
<p>↑ Up: <a href="table-block-operator.html">TOP</a> | Next: <a href="_oops.html">OOPS</a> →</p> | ||
</div> |
49 changes: 49 additions & 0 deletions
49
test/black-box-docs/table-block-operator/table-block-operator.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
= TOP | ||
:toc: | ||
:multipage-level: 2 | ||
|
||
== SECOND | ||
|
||
=== OOPS | ||
|
||
==== DANGER | ||
|
||
This tests the use of the AsciiDoc "a" block-level styling for a single cell. | ||
|
||
[cols=","] | ||
|=== | ||
|abc.$\{ext} a| | ||
* item | ||
|
||
|=== | ||
|
||
The following table from the | ||
link:https://docs.asciidoctor.org/asciidoc/latest/tables/format-column-content/#use-asciidoc-block-elements-in-a-column[AsciiDoc | ||
Language Documentation] uses the "a" operator for the entire first column. | ||
|
||
[cols="2a,2"] | ||
|=== | ||
|Column with the `a` style operator applied to its specifier |Column using the default style | ||
|
||
| | ||
* List item 1 | ||
* List item 2 | ||
* List item 3 | ||
| | ||
* List item 1 | ||
* List item 2 | ||
* List item 3 | ||
|
||
| | ||
[source,python] | ||
---- | ||
import os | ||
print "%s" %(os.uname()) | ||
---- | ||
| | ||
[source,python] | ||
---- | ||
import os | ||
print ("%s" %(os.uname())) | ||
---- | ||
|=== |
17 changes: 17 additions & 0 deletions
17
test/black-box-docs/table-block-operator/table-block-operator.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<div id="toc" class="toc"> | ||
<div id="toctitle">Table of Contents</div> | ||
<p><span class="toc-root toc-current"><a href="table-block-operator.html">TOP</a></span></p><ul class="sectlevel1"> | ||
<li><a href="_second.html">SECOND</a> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="ulist"> | ||
<ul> | ||
<li> | ||
<p><a href="_second.html">SECOND</a></p> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="paragraph nav-footer"> | ||
<p>Next: <a href="_second.html">SECOND</a> →</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters