Update glossary2rst file with new mark-up representations

Change-Id: I3c2b1927302bcfc335ad37c3d587661b3376daef
This commit is contained in:
venkatamahesh 2016-01-13 18:04:23 +05:30
parent fa97587754
commit c69f247450

View File

@ -24,13 +24,13 @@ KNOWN_TAGS = [
'code',
'command',
'filename',
'link',
'literal',
'glossary',
'glossdef',
'glossdiv',
'glossentry',
'glossterm',
'link',
'literal',
'para',
'phrase',
'systemitem',
@ -118,9 +118,9 @@ def convert(element):
if tag == "command":
return ":command:`%s`" % element.text
if tag == "code":
return "`%s`" % element.text
return "``%s``" % element.text
if tag == "filename":
return ":file:`%s`" % element.text
return "``%s``" % element.text
if tag == "glossary":
return concat(element)
if tag == "glossdiv":
@ -130,7 +130,7 @@ def convert(element):
if tag == "link":
return link(element)
if tag == "literal":
return "`%s`" % element.text
return "``%s``" % element.text
if tag == "para":
return "\n\n" + concat(element)
if tag == "phrase":
@ -160,7 +160,7 @@ def glossary_convert(filename):
rstcontent = rst_convert(doc.getroot()).encode('utf-8')
heading = "========\n" + "Glossary\n" + "========\n\n"
heading += ".. comments\n"
heading += " This file file is automatically generated, edit the master"
heading += " This file is automatically generated, edit the master"
heading += " doc/glossary/glossary-terms.xml to update it."
if len(sys.argv) != 2: