aboutsummaryrefslogtreecommitdiff
path: root/testdata/include_code_block_test.txt
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2025-04-18 15:24:10 +0700
committerShulhan <ms@kilabit.info>2025-04-18 15:24:10 +0700
commitf25296bef9bb02f3be87e61c54703e26b7814096 (patch)
tree50693da53586aba7efe84af245f26fbe789725ce /testdata/include_code_block_test.txt
parent89d1a301ea4d42b73d7af3c982ede59e1f868260 (diff)
downloadasciidoctor-go-f25296bef9bb02f3be87e61c54703e26b7814096.tar.xz
all: support include directive inside block code
Example of block code with include directive, ---- ... include::file[] ... ----
Diffstat (limited to 'testdata/include_code_block_test.txt')
-rw-r--r--testdata/include_code_block_test.txt37
1 files changed, 37 insertions, 0 deletions
diff --git a/testdata/include_code_block_test.txt b/testdata/include_code_block_test.txt
new file mode 100644
index 0000000..6215062
--- /dev/null
+++ b/testdata/include_code_block_test.txt
@@ -0,0 +1,37 @@
+Test include directive inside source code block.
+
+>>> case-01
+
+----
+include::testdata/_includes/fragment1.adoc[]
+----
+
+<<< case-01
+
+<div class="listingblock">
+<div class="content">
+<pre>// SPDX-FileCopyrightText: 2020 M. Shulhan &lt;ms@kilabit.info&gt;
+// SPDX-License-Identifier: GPL-3.0-or-later
+This is inside the fragment1.adoc.</pre>
+</div>
+</div>
+
+>>> case-02
+
+----
+before
+include::testdata/_includes/fragment1.adoc[]
+after
+----
+
+<<< case-02
+
+<div class="listingblock">
+<div class="content">
+<pre>before
+// SPDX-FileCopyrightText: 2020 M. Shulhan &lt;ms@kilabit.info&gt;
+// SPDX-License-Identifier: GPL-3.0-or-later
+This is inside the fragment1.adoc.
+after</pre>
+</div>
+</div>