2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00

[2157] some minor editorial fixes

This commit is contained in:
JINMEI Tatuya
2013-02-12 19:41:51 -08:00
committed by Yoshitaka Aharen
parent bd35b30808
commit 0147b8cb62

View File

@@ -194,7 +194,7 @@ def generate_docfile(docfile, def_mtime):
<varlistentry> <varlistentry>
<term>##item_full_name##</term> <term>##item_full_name##</term>
<listitem><simpara>##item_description##</simpara></listitem> <listitem><simpara>##item_description##</simpara></listitem>
<varlistentry> </varlistentry>
xmldocument_command_name in item_description is put inside <command> xmldocument_command_name in item_description is put inside <command>
element. element.
''' '''
@@ -216,7 +216,7 @@ def generate_docfile(docfile, def_mtime):
command.text = word command.text = word
# at this point command.tail is None # at this point command.tail is None
# append a space as trailing text for the next word # append a space as trailing text for the next word
# so it can be concatinated with trailing words # so it can be concatenated with trailing words
command.tail = ' ' command.tail = ' '
prev = command prev = command
else: else:
@@ -248,16 +248,13 @@ def generate_docfile(docfile, def_mtime):
pretty_xml = pretty_xml.decode('utf-8') pretty_xml = pretty_xml.decode('utf-8')
# put newline around <variablelist> and <varlistentry> element # put newline around <variablelist> and <varlistentry> element
pretty_xml = \ pretty_xml = \
re.sub(r'(</?var(?:iablelist|listentry)>)', r'\1\n', re.sub(r'(</?var(?:iablelist|listentry)>)', r'\1\n', pretty_xml)
pretty_xml)
# indent <term> and <listitem> # indent <term> and <listitem>
pretty_xml = \ pretty_xml = \
re.sub(r'(<(?:term|listitem)>)', r' \1', re.sub(r'(<(?:term|listitem)>)', r' \1', pretty_xml)
pretty_xml)
# put newline after </term> and </listitem> # put newline after </term> and </listitem>
pretty_xml = \ pretty_xml = \
re.sub(r'(</(?:term|listitem)>)', r'\1\n', re.sub(r'(</(?:term|listitem)>)', r'\1\n', pretty_xml)
pretty_xml)
with open(builddir+os.sep+docfile, 'w') as doc: with open(builddir+os.sep+docfile, 'w') as doc:
doc.write(doc_pre_xml.replace( doc.write(doc_pre_xml.replace(