mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-02 13:45:49 +00:00
Include identifiers and titles in each case. The code should be credited to @tombolano. Closes #8666.
41 lines
1.1 KiB
Markdown
41 lines
1.1 KiB
Markdown
```
|
|
% 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" ]
|
|
]
|
|
]
|
|
```
|