1. ana-balica
  2. moin-2.0

Commits

Roger Haase  committed 43f6813

fix html validation errors when TOC level is specified

  • Participants
  • Parent commits b980a2e
  • Branches default

Comments (0)

Files changed (1)

File MoinMoin/converter/html_out.py

View file
         return elem_ref
 
     def visit_moinpage_table_of_content(self, elem):
-        level = int(elem.get(moin_page.outline_level, 6))
+        try:
+            level = int(elem.get(moin_page.outline_level))
+            del elem.attrib[moin_page.outline_level]
+        except TypeError:
+            level = 6
 
         attribs = elem.attrib.copy()
         attribs[html.class_] = 'moin-table-of-contents'