Prevent unwanted incrementing of section number in operation macro
See gh-638
This commit is contained in:
committed by
Andy Wilkinson
parent
ae59baf38c
commit
1d911367d6
@@ -118,7 +118,7 @@ public abstract class AbstractOperationBlockMacroTests {
|
||||
@Test
|
||||
public void includeSnippetInSection() throws Exception {
|
||||
String result = this.asciidoctor.convert(
|
||||
"= A\n\nAlpha\n\n== B\n\nBravo\n\n" + "operation::some-operation[snippets='curl-request']",
|
||||
"= A\n:doctype: book\n:sectnums:\n\nAlpha\n\n== B\n\nBravo\n\n" + "operation::some-operation[snippets='curl-request']\n\n== C\n",
|
||||
this.options);
|
||||
assertThat(result).isEqualTo(getExpectedContentFromFile("snippet-in-section"));
|
||||
}
|
||||
|
||||
@@ -6,18 +6,24 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_b">B</h2>
|
||||
<h2 id="_b">1. B</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Bravo</p>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_b_curl_request">Curl request</h3>
|
||||
<h3 id="_b_curl_request">1.1. Curl request</h3>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl 'http://localhost:8080/' -i</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_c">2. C</h2>
|
||||
<div class="sectionbody">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user