2016-03-07 03:29:31 +00:00
|
|
|
#
|
|
|
|
# Pandoc doesn't grok <function> or <structname>, so convert them
|
|
|
|
# ahead of time.
|
|
|
|
#
|
2016-05-26 07:40:17 +00:00
|
|
|
# Use the following escapes to pass through pandoc:
|
|
|
|
# $bq = "`"
|
|
|
|
# $lt = "<"
|
|
|
|
# $gt = ">"
|
2016-03-07 03:29:31 +00:00
|
|
|
#
|
2016-05-26 07:15:18 +00:00
|
|
|
s%<function>\([^<(]\+\)()</function>%:c:func:$bq\1()$bq%g
|
|
|
|
s%<function>\([^<(]\+\)</function>%:c:func:$bq\1()$bq%g
|
2016-05-26 07:40:17 +00:00
|
|
|
s%<structname>struct *\([^<]\+\)</structname>%:c:type:$bqstruct \1 $lt\1$gt$bq%g
|
|
|
|
s%struct <structname>\([^<]\+\)</structname>%:c:type:$bqstruct \1 $lt\1$gt$bq%g
|
|
|
|
s%<structname>\([^<]\+\)</structname>%:c:type:$bqstruct \1 $lt\1$gt$bq%g
|
2016-03-07 03:29:31 +00:00
|
|
|
#
|
|
|
|
# Wrap docproc directives in para and code blocks.
|
|
|
|
#
|
|
|
|
s%^\(!.*\)$%<para><code>DOCPROC: \1</code></para>%
|