aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-02-01 17:04:38 -0800
committerJohn MacFarlane <[email protected]>2025-02-01 17:04:38 -0800
commit1470b3a5732f2e48bd97fe4c62cdf11e64c02e73 (patch)
treefd8bf97d90c3424c8298c4466a027f5f7fb968cf /test
parentc0dc9538255b1ec316129e37d88dedeba982d302 (diff)
DocBook reader: better handle formalpara, example, and sidebar.
Include identifiers and titles in each case. The code should be credited to @tombolano. Closes #8666.
Diffstat (limited to 'test')
-rw-r--r--test/command/8666.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/command/8666.md b/test/command/8666.md
new file mode 100644
index 000000000..5e08c5ba5
--- /dev/null
+++ b/test/command/8666.md
@@ -0,0 +1,40 @@
+```
+% pandoc -f docbook -t native
+<formalpara xml:id="my_code_id">
+<title>Code title</title>
+<para>
+<programlisting language="bash" linenumbering="unnumbered">echo "hello world!"</programlisting>
+</para>
+</formalpara>
+<example xml:id="my_example_id">
+<title>Example title</title>
+<simpara>example content</simpara>
+</example>
+<sidebar xml:id="my_sidebar_id">
+<title>Sidebar title</title>
+<simpara>sidebar content</simpara>
+</sidebar>
+^D
+[ Div
+ ( "my_code_id" , [ "formalpara" ] , [] )
+ [ Div
+ ( "" , [ "title" ] , [] )
+ [ Plain [ Str "Code" , Space , Str "title" ] ]
+ , CodeBlock ( "" , [ "bash" ] , [] ) "echo \"hello world!\""
+ ]
+, Div
+ ( "my_example_id" , [ "example" ] , [] )
+ [ Div
+ ( "" , [ "title" ] , [] )
+ [ Plain [ Str "Example" , Space , Str "title" ] ]
+ , Para [ Str "example" , Space , Str "content" ]
+ ]
+, Div
+ ( "my_sidebar_id" , [ "sidebar" ] , [] )
+ [ Div
+ ( "" , [ "title" ] , [] )
+ [ Plain [ Str "Sidebar" , Space , Str "title" ] ]
+ , Para [ Str "sidebar" , Space , Str "content" ]
+ ]
+]
+```