blob: c1503fcca4ecac1c10ff6196952947e9ee196798 [file] [log] [blame]
Jonathan Corbet89a66d72016-03-06 20:29:31 -07001#
2# Pandoc doesn't grok <function> or <structname>, so convert them
3# ahead of time.
4#
Jani Nikula30ca7aa2016-05-26 10:40:17 +03005# Use the following escapes to pass through pandoc:
6# $bq = "`"
7# $lt = "<"
8# $gt = ">"
Jonathan Corbet89a66d72016-03-06 20:29:31 -07009#
Jani Nikula2e83ecb2016-05-26 10:15:18 +030010s%<function>\([^<(]\+\)()</function>%:c:func:$bq\1()$bq%g
11s%<function>\([^<(]\+\)</function>%:c:func:$bq\1()$bq%g
Jani Nikula30ca7aa2016-05-26 10:40:17 +030012s%<structname>struct *\([^<]\+\)</structname>%:c:type:$bqstruct \1 $lt\1$gt$bq%g
13s%struct <structname>\([^<]\+\)</structname>%:c:type:$bqstruct \1 $lt\1$gt$bq%g
14s%<structname>\([^<]\+\)</structname>%:c:type:$bqstruct \1 $lt\1$gt$bq%g
Jonathan Corbet89a66d72016-03-06 20:29:31 -070015#
16# Wrap docproc directives in para and code blocks.
17#
18s%^\(!.*\)$%<para><code>DOCPROC: \1</code></para>%