@@ -85,7 +85,7 @@ because ``ObjectDescription`` is a special-purpose directive that's intended
8585for describing things like classes, functions, or, in our case, recipes. More
8686specifically, ``handle_signature `` implements parsing the signature of the
8787directive and passes on the object's name and type to its superclass, while
88- ``add_taget_and_index `` adds a target (to link to) and an entry to the index
88+ ``add_target_and_index `` adds a target (to link to) and an entry to the index
8989for this node.
9090
9191We also see that this directive defines ``has_content ``, ``required_arguments ``
@@ -122,9 +122,10 @@ all it really is is a list of tuples like ``('tomato', 'TomatoSoup', 'test',
122122'rec-TomatoSoup',...) ``. Refer to the :doc: `domain API guide
123123</extdev/domainapi>` for more information on this API.
124124
125- These index pages can be referred by combination of domain name and its
126- ``name `` using :rst:role: `ref ` role. For example, ``RecipeIndex `` can be
127- referred by ``:ref:`recipe-recipe` ``.
125+ These index pages can be referenced with the :rst:role: `ref ` role by combining
126+ the domain name and the index ``name `` value. For example, ``RecipeIndex `` can be
127+ referenced with ``:ref:`recipe-recipe` `` and ``IngredientIndex `` can be referenced
128+ with ``:ref:`recipe-ingredient` ``.
128129
129130.. rubric :: The domain
130131
@@ -152,7 +153,7 @@ Moving on, we can see that we've defined ``initial_data``. The values defined in
152153``initial_data `` will be copied to ``env.domaindata[domain_name] `` as the
153154initial data of the domain, and domain instances can access it via
154155``self.data ``. We see that we have defined two items in ``initial_data ``:
155- ``recipes `` and ``recipe2ingredient ``. These contain a list of all objects
156+ ``recipes `` and ``recipe_ingredients ``. Each contains a list of all objects
156157defined (i.e. all recipes) and a hash that maps a canonical ingredient name to
157158the list of objects. The way we name objects is common across our extension and
158159is defined in the ``get_full_qualified_name `` method. For each object created,
@@ -214,7 +215,7 @@ You can now use the extension throughout your project. For example:
214215
215216 The important things to note are the use of the ``:recipe:ref: `` role to
216217cross-reference the recipe actually defined elsewhere (using the
217- ``:recipe:recipe: `` directive.
218+ ``:recipe:recipe: `` directive) .
218219
219220
220221Further reading
0 commit comments