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.
|
* #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!
|
Release 1.1.2 (Nov 1, 2011) -- 1.1.1 is a silly version number anyway!
|
||||||
======================================================================
|
======================================================================
|
||||||
|
@ -245,6 +245,9 @@ class Glossary(Directive):
|
|||||||
continue
|
continue
|
||||||
# unindented line -> a term
|
# unindented line -> a term
|
||||||
if line and not line[0].isspace():
|
if line and not line[0].isspace():
|
||||||
|
# enable comments
|
||||||
|
if line.startswith('.. '):
|
||||||
|
continue
|
||||||
# first term of definition
|
# first term of definition
|
||||||
if in_definition:
|
if in_definition:
|
||||||
if not was_empty:
|
if not was_empty:
|
||||||
@ -315,6 +318,7 @@ class Glossary(Directive):
|
|||||||
term += system_messages
|
term += system_messages
|
||||||
|
|
||||||
defnode = nodes.definition()
|
defnode = nodes.definition()
|
||||||
|
if definition:
|
||||||
self.state.nested_parse(definition, definition.items[0][1], defnode)
|
self.state.nested_parse(definition, definition.items[0][1], defnode)
|
||||||
|
|
||||||
items.append((termtexts,
|
items.append((termtexts,
|
||||||
|
Loading…
Reference in New Issue
Block a user