mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #8860: doc: recipe directive crashes with AttributeError
The pre check in the `ReceipeDirective.add_target_and_index() was wrong. It checkes non-existing option "noindex", but it should check "contains" option instead.
This commit is contained in:
parent
f11592eb32
commit
f17ab57b64
@ -24,7 +24,7 @@ class RecipeDirective(ObjectDescription):
|
|||||||
|
|
||||||
def add_target_and_index(self, name_cls, sig, signode):
|
def add_target_and_index(self, name_cls, sig, signode):
|
||||||
signode['ids'].append('recipe' + '-' + sig)
|
signode['ids'].append('recipe' + '-' + sig)
|
||||||
if 'noindex' not in self.options:
|
if 'contains' not in self.options:
|
||||||
ingredients = [
|
ingredients = [
|
||||||
x.strip() for x in self.options.get('contains').split(',')]
|
x.strip() for x in self.options.get('contains').split(',')]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user