diff --git a/refpolicy/doc/templates/interface.html b/refpolicy/doc/templates/interface.html index 85a669a8b..59680ec04 100644 --- a/refpolicy/doc/templates/interface.html +++ b/refpolicy/doc/templates/interface.html @@ -32,7 +32,7 @@ [[end]]
Description:
-[[int['interface_desc']]]

+[[int['interface_desc']]]
Parameters:
diff --git a/refpolicy/support/sedoctool.py b/refpolicy/support/sedoctool.py index 73a5a107b..dba1c0bce 100755 --- a/refpolicy/support/sedoctool.py +++ b/refpolicy/support/sedoctool.py @@ -36,7 +36,7 @@ def read_policy_xml(filename): def gen_tunable_conf(doc, file): for node in doc.getElementsByTagName("tunable"): - s = string.split(node.firstChild.data, "\n") + s = string.split(format_txt_desc(node), "\n") for line in s: file.write("# %s\n" % line) tun_name = tun_val = None @@ -66,10 +66,12 @@ def gen_module_conf(doc, file): file.write("# Layer: %s\n# Module: %s\n#\n" % (mod_layer,mod_name)) for desc in node.getElementsByTagName("summary"): - s = string.split(desc.firstChild.data, "\n") + if not desc.parentNode == node: + continue + s = string.split(format_txt_desc(desc), "\n") for line in s: file.write("# %s\n" % line) - file.write("#\n#%s\n\n" % mod_name) + file.write("#%s\n\n" % mod_name) def stupid_cmp(a, b): return cmp(a[0], b[0]) @@ -93,7 +95,7 @@ def gen_doc_menu(mod_layer, module_list): x[1].sort(stupid_cmp) return menu -def format_desc(node): +def format_html_desc(node): desc_buf = '' for desc in node.childNodes: @@ -103,13 +105,27 @@ def format_desc(node): desc_buf += "

" + desc.firstChild.data + "

" for chld in desc.childNodes: if chld.nodeName == "ul": - print "got a ul!" desc_buf += "