Documentation/sphinx: nicer referencing of struct in docbook->rst conversion
Add "struct" in the label of the reference. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
2e83ecb834
commit
30ca7aaf27
@ -2,12 +2,16 @@
|
|||||||
# Pandoc doesn't grok <function> or <structname>, so convert them
|
# Pandoc doesn't grok <function> or <structname>, so convert them
|
||||||
# ahead of time.
|
# ahead of time.
|
||||||
#
|
#
|
||||||
# Use "$bq" instead of "`" so that pandoc won't mess with it.
|
# Use the following escapes to pass through pandoc:
|
||||||
|
# $bq = "`"
|
||||||
|
# $lt = "<"
|
||||||
|
# $gt = ">"
|
||||||
#
|
#
|
||||||
s%<function>\([^<(]\+\)()</function>%:c:func:$bq\1()$bq%g
|
s%<function>\([^<(]\+\)()</function>%:c:func:$bq\1()$bq%g
|
||||||
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>struct *\([^<]\+\)</structname>%:c:type:$bqstruct \1 $lt\1$gt$bq%g
|
||||||
s%<structname>\([^<]\+\)</structname>%:c:type:$bq\1$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
|
||||||
#
|
#
|
||||||
# Wrap docproc directives in para and code blocks.
|
# Wrap docproc directives in para and code blocks.
|
||||||
#
|
#
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
#
|
#
|
||||||
# pandoc thinks that both "_" needs to be escaped. Remove the extra
|
# Unescape.
|
||||||
# backslashes. Also put in proper backquotes now that pandoc won't quote
|
|
||||||
# them.
|
|
||||||
#
|
#
|
||||||
s/$bq/`/g
|
s/$bq/`/g
|
||||||
|
s/$lt/</g
|
||||||
|
s/$gt/>/g
|
||||||
|
#
|
||||||
|
# pandoc thinks that both "_" needs to be escaped. Remove the extra
|
||||||
|
# backslashes.
|
||||||
|
#
|
||||||
s/\\_/_/g
|
s/\\_/_/g
|
||||||
#
|
#
|
||||||
# Unwrap docproc directives.
|
# Unwrap docproc directives.
|
||||||
|
Loading…
Reference in New Issue
Block a user