Jonathan Corbet | 89a66d7 | 2016-03-06 20:29:31 -0700 | [diff] [blame] | 1 | # |
| 2 | # Pandoc doesn't grok <function> or <structname>, so convert them |
| 3 | # ahead of time. |
| 4 | # |
Jani Nikula | 30ca7aa | 2016-05-26 10:40:17 +0300 | [diff] [blame] | 5 | # Use the following escapes to pass through pandoc: |
| 6 | # $bq = "`" |
| 7 | # $lt = "<" |
| 8 | # $gt = ">" |
Jonathan Corbet | 89a66d7 | 2016-03-06 20:29:31 -0700 | [diff] [blame] | 9 | # |
Jani Nikula | 2e83ecb | 2016-05-26 10:15:18 +0300 | [diff] [blame] | 10 | s%<function>\([^<(]\+\)()</function>%:c:func:$bq\1()$bq%g |
| 11 | s%<function>\([^<(]\+\)</function>%:c:func:$bq\1()$bq%g |
Jani Nikula | 30ca7aa | 2016-05-26 10:40:17 +0300 | [diff] [blame] | 12 | s%<structname>struct *\([^<]\+\)</structname>%:c:type:$bqstruct \1 $lt\1$gt$bq%g |
| 13 | s%struct <structname>\([^<]\+\)</structname>%:c:type:$bqstruct \1 $lt\1$gt$bq%g |
| 14 | s%<structname>\([^<]\+\)</structname>%:c:type:$bqstruct \1 $lt\1$gt$bq%g |
Jonathan Corbet | 89a66d7 | 2016-03-06 20:29:31 -0700 | [diff] [blame] | 15 | # |
| 16 | # Wrap docproc directives in para and code blocks. |
| 17 | # |
| 18 | s%^\(!.*\)$%<para><code>DOCPROC: \1</code></para>% |