mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #832: Fix crashes when putting comments or lone terms in a glossary.
This commit is contained in:
parent
f150be8d25
commit
8f9b88f27f
2
CHANGES
2
CHANGES
@ -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!
|
||||
======================================================================
|
||||
|
@ -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,7 +318,8 @@ class Glossary(Directive):
|
||||
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)))
|
||||
|
Loading…
Reference in New Issue
Block a user