From e046e4de145009ae6baf27f8e0553a666e6a8d3d Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Tue, 14 Feb 2017 20:01:48 +0000 Subject: [PATCH] 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 --- newlib/doc/makedocbook.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/newlib/doc/makedocbook.py b/newlib/doc/makedocbook.py index 0c84e3c47..cf48c3402 100755 --- a/newlib/doc/makedocbook.py +++ b/newlib/doc/makedocbook.py @@ -293,9 +293,8 @@ def synopsis(c, t): s = '' for l in t.splitlines(): - if re.match('\s*[#[]', l): - # a #include, #define etc. - # fpclassify contains some comments in [ ] brackets + if re.match('\s*(#|\[|struct)', l): + # preprocessor # directives, structs, comments in square brackets funcsynopsisinfo = lxml.etree.SubElement(funcsynopsis, 'funcsynopsisinfo') funcsynopsisinfo.text = l.strip() + '\n' else: @@ -468,6 +467,8 @@ def line_markup_convert(p): # also convert some simple texinfo markup # convert @emph{foo} to foo s = re.sub('@emph{(.*?)}', '\\1', s) + # convert @strong{foo} to foo + s = re.sub('@strong{(.*?)}', '\\1', s) # convert @minus{} to U+2212 MINUS SIGN s = s.replace('@minus{}', '−') # convert @dots{} to U+2026 HORIZONTAL ELLIPSIS