Fix xml tagging for non-swift config tables
A previous patch attempted to introduce semantic tagging for options and their default values in the automatically generated configuration reference tables. While this worked well for swift, incorrect code was used for the XML generation of the main autohelp.py method. This patch fixes the string based code to use XML subElements as was already done for extract_swift_flags. Change-Id: I93a89b726d66acd0778e8365f47d5ee2f2e0b3c5
This commit is contained in:
parent
a2970b1d39
commit
3363d2e1cb
@ -406,9 +406,11 @@ def write_docbook(package_name, options, target, verbose=0):
|
||||
tbody.append(tr)
|
||||
|
||||
td = etree.Element('td')
|
||||
td.text = ("<option>%s</option> = "
|
||||
"<replaceable>%s</replaceable>"
|
||||
) % (option.dest, default)
|
||||
option_xml = etree.SubElement(td, 'option')
|
||||
option_xml.text = "%s" % option.dest
|
||||
option_xml.tail = " = "
|
||||
replaceable_xml = etree.SubElement(td, 'replaceable')
|
||||
replaceable_xml.text = "%s" % default
|
||||
tr.append(td)
|
||||
|
||||
td = etree.Element('td')
|
||||
@ -491,9 +493,11 @@ def write_docbook_rootwrap(package_name, repo, target, verbose=0):
|
||||
tbody.append(tr)
|
||||
|
||||
td = etree.Element('td')
|
||||
td.text = ("<option>%s</option> = "
|
||||
"<replaceable>%s</replaceable>"
|
||||
) % (optname, default)
|
||||
option_xml = etree.SubElement(td, 'option')
|
||||
option_xml.text = "%s" % optname
|
||||
option_xml.tail = " = "
|
||||
replaceable_xml = etree.SubElement(td, 'replaceable')
|
||||
replaceable_xml.text = "%s" % default
|
||||
tr.append(td)
|
||||
|
||||
td = etree.Element('td')
|
||||
|
Loading…
x
Reference in New Issue
Block a user