public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Update makedocbook for bd547490
@ 2017-02-15 15:32 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2017-02-15 15:32 UTC (permalink / raw)
To: newlib-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=e046e4de145009ae6baf27f8e0553a666e6a8d3d
commit e046e4de145009ae6baf27f8e0553a666e6a8d3d
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Tue Feb 14 20:01:48 2017 +0000
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
Diff:
---
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 <emphasis>foo</emphasis>
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
s = s.replace('@minus{}', '−')
# convert @dots{} to U+2026 HORIZONTAL ELLIPSIS
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-15 15:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 15:32 [newlib-cygwin] Update makedocbook for bd547490 Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).