Update makedocbook for bd547490
Teach makedocbook how to handle some new things seen in the makedoc markup since bd547490: - struct lines appearing in the synopsis - use of @strong{} texinfo markup
This commit is contained in:
parent
be5926babb
commit
e046e4de14
|
@ -293,9 +293,8 @@ def synopsis(c, t):
|
||||||
|
|
||||||
s = ''
|
s = ''
|
||||||
for l in t.splitlines():
|
for l in t.splitlines():
|
||||||
if re.match('\s*[#[]', l):
|
if re.match('\s*(#|\[|struct)', l):
|
||||||
# a #include, #define etc.
|
# preprocessor # directives, structs, comments in square brackets
|
||||||
# fpclassify contains some comments in [ ] brackets
|
|
||||||
funcsynopsisinfo = lxml.etree.SubElement(funcsynopsis, 'funcsynopsisinfo')
|
funcsynopsisinfo = lxml.etree.SubElement(funcsynopsis, 'funcsynopsisinfo')
|
||||||
funcsynopsisinfo.text = l.strip() + '\n'
|
funcsynopsisinfo.text = l.strip() + '\n'
|
||||||
else:
|
else:
|
||||||
|
@ -468,6 +467,8 @@ def line_markup_convert(p):
|
||||||
# also convert some simple texinfo markup
|
# also convert some simple texinfo markup
|
||||||
# convert @emph{foo} to <emphasis>foo</emphasis>
|
# convert @emph{foo} to <emphasis>foo</emphasis>
|
||||||
s = re.sub('@emph{(.*?)}', '<emphasis>\\1</emphasis>', s)
|
s = re.sub('@emph{(.*?)}', '<emphasis>\\1</emphasis>', s)
|
||||||
|
# convert @strong{foo} to <emphasis role=strong>foo</emphasis>
|
||||||
|
s = re.sub('@strong{(.*?)}', '<emphasis role="strong">\\1</emphasis>', s)
|
||||||
# convert @minus{} to U+2212 MINUS SIGN
|
# convert @minus{} to U+2212 MINUS SIGN
|
||||||
s = s.replace('@minus{}', '−')
|
s = s.replace('@minus{}', '−')
|
||||||
# convert @dots{} to U+2026 HORIZONTAL ELLIPSIS
|
# convert @dots{} to U+2026 HORIZONTAL ELLIPSIS
|
||||||
|
|
Loading…
Reference in New Issue