From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124091 invoked by alias); 14 Feb 2017 20:02:14 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 123837 invoked by uid 89); 14 Feb 2017 20:02:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.5 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=@dots, 2212, 2.8.3, UD:replace X-HELO: rgout01.bt.lon5.cpcloud.co.uk Received: from rgout0104.bt.lon5.cpcloud.co.uk (HELO rgout01.bt.lon5.cpcloud.co.uk) (65.20.0.124) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Feb 2017 20:02:02 +0000 X-OWM-Source-IP: 86.184.210.45 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-Junkmail-Premium-Raw: score=7/50,refid=2.7.2:2017.2.14.194216:17:7.944,ip=,rules=__HAS_FROM, __TO_MALFORMED_2, __TO_NO_NAME, __HAS_CC_HDR, __CC_NAME, __CC_NAME_DIFF_FROM_ACC, __SUBJ_ALPHA_END, __HAS_MSGID, __SANE_MSGID, __HAS_X_MAILER, __FROM_DOMAIN_IN_ANY_CC1, __ANY_URI, __URI_NO_MAILTO, __URI_NO_WWW, __NO_HTML_TAG_RAW, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_1400_1499, __MIME_TEXT_P1, __MIME_TEXT_ONLY, HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, __FROM_DOMAIN_IN_RCPT, __CC_REAL_NAMES, MULTIPLE_REAL_RCPTS, LEGITIMATE_SIGNS, BODY_SIZE_2000_LESS, __MIME_TEXT_P, NO_URI_HTTPS, BODY_SIZE_7000_LESS Received: from localhost.localdomain (86.184.210.45) by rgout01.bt.lon5.cpcloud.co.uk (9.0.019.13-1) (authenticated as jonturney@btinternet.com) id 584829CB06610AEB; Tue, 14 Feb 2017 20:01:59 +0000 From: Jon Turney To: newlib@sourceware.org Cc: Jon Turney Subject: [PATCH] Update makedocbook for bd547490 Date: Tue, 14 Feb 2017 20:02:00 -0000 Message-Id: <20170214200148.81728-1-jon.turney@dronecode.org.uk> X-SW-Source: 2017/txt/msg00143.txt.bz2 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 0c84e3c..cf48c34 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 -- 2.8.3