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

This commit is contained in:
Georg Brandl 2012-01-29 11:36:12 +01:00
parent f150be8d25
commit 8f9b88f27f
2 changed files with 7 additions and 1 deletions

View File

@ -33,6 +33,8 @@ Release 1.1.3 (in development)
* #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!
======================================================================

View File

@ -245,6 +245,9 @@ class Glossary(Directive):
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:
@ -315,6 +318,7 @@ class Glossary(Directive):
term += system_messages
defnode = nodes.definition()
if definition:
self.state.nested_parse(definition, definition.items[0][1], defnode)
items.append((termtexts,