File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,6 +227,22 @@ def cleanup_trailing_parens(doc, element_names):
227227 queue .append (child )
228228
229229
230+ def cleanup_synopses (doc ):
231+ # Actually, this should build a "moduleinfo" element from various
232+ # parts of the meta-information in the section. <moduleinfo> needs
233+ # some design work before we can really do anything real.
234+ synopses = doc .getElementsByTagName ("modulesynopsis" )
235+ for node in synopses :
236+ node ._node .name = "synopsis"
237+ parent = node .parentNode
238+ if parent .tagName == "section" :
239+ children = parent .childNodes
240+ parent .removeChild (node )
241+ parent .insertBefore (node , children [2 ])
242+ text = doc .createTextNode ("\n " )
243+ parent .insertBefore (text , node )
244+
245+
230246_token_rx = re .compile (r"[a-zA-Z][a-zA-Z0-9.-]*$" )
231247
232248def write_esis (doc , ofp , knownempty ):
@@ -275,6 +291,7 @@ def convert(ifp, ofp):
275291 })
276292 cleanup_root_text (doc )
277293 cleanup_trailing_parens (doc , ["function" , "method" , "cfunction" ])
294+ cleanup_synopses (doc )
278295 #
279296 d = {}
280297 for gi in p .get_empties ():
You can’t perform that action at this time.
0 commit comments