Commits

Georg Brandl  committed 7cd756d

Closes #832: Fix crashes when putting comments or lone terms in a glossary.

  • Participants
  • Parent commits b4b0256
  • Branches stable

Comments (0)

Files changed (2)

 
 * #854: Fix inheritance_diagram raising attribute errors on builtins.
 
+* #832: Fix crashes when putting comments or lone terms in a glossary.
+
 
 Release 1.1.2 (Nov 1, 2011) -- 1.1.1 is a silly version number anyway!
 ======================================================================

File sphinx/domains/std.py

                 continue
             # unindented line -> a term
             if line and not line[0].isspace():
+                # enable comments
+                if line.startswith('.. '):
+                    continue
                 # first term of definition
                 if in_definition:
                     if not was_empty:
             term += system_messages
 
             defnode = nodes.definition()
-            self.state.nested_parse(definition, definition.items[0][1], defnode)
+            if definition:
+                self.state.nested_parse(definition, definition.items[0][1], defnode)
 
             items.append((termtexts,
                           nodes.definition_list_item('', term, defnode)))