2016-03-07 11:29:31 +08:00
|
|
|
#
|
|
|
|
# Pandoc doesn't grok <function> or <structname>, so convert them
|
|
|
|
# ahead of time.
|
|
|
|
#
|
|
|
|
# Use "$bq" instead of "`" so that pandoc won't mess with it.
|
|
|
|
#
|
2016-05-26 15:15:18 +08:00
|
|
|
s%<function>\([^<(]\+\)()</function>%:c:func:$bq\1()$bq%g
|
|
|
|
s%<function>\([^<(]\+\)</function>%:c:func:$bq\1()$bq%g
|
|
|
|
s%<structname>struct *\([^<]\+\)</structname>%:c:type:$bq\1$bq%g
|
|
|
|
s%<structname>\([^<]\+\)</structname>%:c:type:$bq\1$bq%g
|
2016-03-07 11:29:31 +08:00
|
|
|
#
|
|
|
|
# Wrap docproc directives in para and code blocks.
|
|
|
|
#
|
|
|
|
s%^\(!.*\)$%<para><code>DOCPROC: \1</code></para>%
|