sphinx: update docbook->rst conversion script match C domain spec
[cascardo/linux.git] / Documentation / sphinx / convert_template.sed
1 #
2 # Pandoc doesn't grok <function> or <structname>, so convert them
3 # ahead of time.
4 #
5 # Use "$bq" instead of "`" so that pandoc won't mess with it.
6 #
7 s%<function>\([^<(]\+\)()</function>%:c:func:$bq\1()$bq%g
8 s%<function>\([^<(]\+\)</function>%:c:func:$bq\1()$bq%g
9 s%<structname>struct *\([^<]\+\)</structname>%:c:type:$bq\1$bq%g
10 s%<structname>\([^<]\+\)</structname>%:c:type:$bq\1$bq%g
11 #
12 # Wrap docproc directives in para and code blocks.
13 #
14 s%^\(!.*\)$%<para><code>DOCPROC: \1</code></para>%