diff --git a/mwparserfromhell/nodes/tag.py b/mwparserfromhell/nodes/tag.py index 661304e..f283d46 100644 --- a/mwparserfromhell/nodes/tag.py +++ b/mwparserfromhell/nodes/tag.py @@ -240,7 +240,7 @@ class Tag(Node): pad_before_eq="", pad_after_eq=""): """Add an attribute with the given *name* and *value*. - *name* and *value* can be anything parasable by + *name* and *value* can be anything parsable by :py:func:`.utils.parse_anything`; *value* can be omitted if the attribute is valueless. *quoted* is a bool telling whether to wrap the *value* in double quotes (this is recommended). *pad_first*, diff --git a/mwparserfromhell/nodes/template.py b/mwparserfromhell/nodes/template.py index d1a0b0e..3b5b35c 100644 --- a/mwparserfromhell/nodes/template.py +++ b/mwparserfromhell/nodes/template.py @@ -95,7 +95,7 @@ class Template(Node): def _select_theory(self, theories): """Return the most likely spacing convention given different options. - Given a dictionary of convention options as keys and their occurance as + Given a dictionary of convention options as keys and their occurrence as values, return the convention that occurs the most, or ``None`` if there is no clear preferred style. """ @@ -208,7 +208,7 @@ class Template(Node): preserve_spacing=True): """Add a parameter to the template with a given *name* and *value*. - *name* and *value* can be anything parasable by + *name* and *value* can be anything parsable by :py:func:`.utils.parse_anything`; pipes and equal signs are automatically escaped from *value* when appropriate. @@ -226,7 +226,7 @@ class Template(Node): name), then we will place the parameter immediately before this one. Otherwise, it will be added at the end. If *before* is a name and exists multiple times in the template, we will place it before the last - occurance. If *before* is not in the template, :py:exc:`ValueError` is + occurrence. If *before* is not in the template, :py:exc:`ValueError` is raised. The argument is ignored if the new parameter already exists. If *preserve_spacing* is ``False``, we will avoid preserving spacing diff --git a/mwparserfromhell/wikicode.py b/mwparserfromhell/wikicode.py index 44515a6..f728248 100644 --- a/mwparserfromhell/wikicode.py +++ b/mwparserfromhell/wikicode.py @@ -294,7 +294,7 @@ class Wikicode(StringMixIn): def insert(self, index, value): """Insert *value* at *index* in the list of nodes. - *value* can be anything parasable by :py:func:`.parse_anything`, which + *value* can be anything parsable by :py:func:`.parse_anything`, which includes strings or other :py:class:`~.Wikicode` or :py:class:`~.Node` objects. """ @@ -309,7 +309,7 @@ class Wikicode(StringMixIn): :py:class:`~.Wikicode` object (as created by :py:meth:`get_sections`, for example). If *obj* is a string, we will operate on all instances of that string within the code, otherwise only on the specific instance - given. *value* can be anything parasable by :py:func:`.parse_anything`. + given. *value* can be anything parsable by :py:func:`.parse_anything`. If *recursive* is ``True``, we will try to find *obj* within our child nodes even if it is not a direct descendant of this :py:class:`~.Wikicode` object. If *obj* is not found, @@ -333,7 +333,7 @@ class Wikicode(StringMixIn): :py:class:`~.Wikicode` object (as created by :py:meth:`get_sections`, for example). If *obj* is a string, we will operate on all instances of that string within the code, otherwise only on the specific instance - given. *value* can be anything parasable by :py:func:`.parse_anything`. + given. *value* can be anything parsable by :py:func:`.parse_anything`. If *recursive* is ``True``, we will try to find *obj* within our child nodes even if it is not a direct descendant of this :py:class:`~.Wikicode` object. If *obj* is not found, @@ -357,7 +357,7 @@ class Wikicode(StringMixIn): :py:class:`~.Wikicode` object (as created by :py:meth:`get_sections`, for example). If *obj* is a string, we will operate on all instances of that string within the code, otherwise only on the specific instance - given. *value* can be anything parasable by :py:func:`.parse_anything`. + given. *value* can be anything parsable by :py:func:`.parse_anything`. If *recursive* is ``True``, we will try to find *obj* within our child nodes even if it is not a direct descendant of this :py:class:`~.Wikicode` object. If *obj* is not found, @@ -380,7 +380,7 @@ class Wikicode(StringMixIn): def append(self, value): """Insert *value* at the end of the list of nodes. - *value* can be anything parasable by :py:func:`.parse_anything`. + *value* can be anything parsable by :py:func:`.parse_anything`. """ nodes = parse_anything(value).nodes for node in nodes: