summaryrefslogtreecommitdiff
path: root/Documentation/sphinx/post_convert.sed
blob: ce17049f6a8eefd001990b0378107e4e585591ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# pandoc thinks that both "_" needs to be escaped.  Remove the extra
# backslashes.  Also put in proper backquotes now that pandoc won't quote
# them.
#
s/$bq/`/g
s/\\_/_/g
#
# Unwrap docproc directives.
#
s/^``DOCPROC: !E\(.*\)``$/.. kernel-doc:: \1\n   :export:/
s/^``DOCPROC: !I\(.*\)``$/.. kernel-doc:: \1\n   :internal:/
s/^``DOCPROC: !F\([^ ]*\) \(.*\)``$/.. kernel-doc:: \1\n   :functions: \2/
s/^``DOCPROC: !P\([^ ]*\) \(.*\)``$/.. kernel-doc:: \1\n   :doc: \2/
s/^``DOCPROC: \(!.*\)``$/.. WARNING: DOCPROC directive not supported: \1/
#
# Trim trailing whitespace.
#
s/[[:space:]]*$//