]> git.karo-electronics.de Git - karo-tx-linux.git/blob - Documentation/sphinx/convert_template.sed
sphinx: cheesy script to convert .tmpl files
[karo-tx-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>%:ref:$bqstruct \1$bq%g
10 s%<structname>\([^<]\+\)</structname>%:ref:$bqstruct \1$bq%g
11 #
12 # Wrap docproc directives in para and code blocks.
13 #
14 s%^\(!.*\)$%<para><code>DOCPROC: \1</code></para>%