summaryrefslogtreecommitdiff
path: root/markdown/extensions
diff options
context:
space:
mode:
authorFlorian Best <best@univention.de>2022-03-18 10:36:20 +0100
committerWaylan Limberg <waylan.limberg@icloud.com>2022-03-18 09:41:43 -0400
commit383de86c64101b8d14768d9a247c9efc97d703bd (patch)
treec16379b57d88cf8531043ee0a1284dcef105adcb /markdown/extensions
parentaf38c42706f8dff93694d4a7572003dbd8b0ddc0 (diff)
downloadpython-markdown-383de86c64101b8d14768d9a247c9efc97d703bd.tar.gz
[style]: fix various typos in docstrings and comments
Diffstat (limited to 'markdown/extensions')
-rw-r--r--markdown/extensions/__init__.py6
-rw-r--r--markdown/extensions/codehilite.py4
-rw-r--r--markdown/extensions/def_list.py2
-rw-r--r--markdown/extensions/footnotes.py6
-rw-r--r--markdown/extensions/legacy_attrs.py2
-rw-r--r--markdown/extensions/legacy_em.py2
-rw-r--r--markdown/extensions/md_in_html.py4
-rw-r--r--markdown/extensions/tables.py2
-rw-r--r--markdown/extensions/toc.py2
9 files changed, 15 insertions, 15 deletions
diff --git a/markdown/extensions/__init__.py b/markdown/extensions/__init__.py
index 4bc8e5f..18ceee6 100644
--- a/markdown/extensions/__init__.py
+++ b/markdown/extensions/__init__.py
@@ -26,7 +26,7 @@ from ..util import parseBoolValue
class Extension:
""" Base class for extensions to subclass. """
- # Default config -- to be overriden by a subclass
+ # Default config -- to be overridden by a subclass
# Must be of the following format:
# {
# 'key': ['value', 'description']
@@ -90,9 +90,9 @@ class Extension:
def extendMarkdown(self, md):
"""
- Add the various proccesors and patterns to the Markdown Instance.
+ Add the various proccessors and patterns to the Markdown Instance.
- This method must be overriden by every extension.
+ This method must be overridden by every extension.
Keyword arguments:
diff --git a/markdown/extensions/codehilite.py b/markdown/extensions/codehilite.py
index e1c2218..1a8761b 100644
--- a/markdown/extensions/codehilite.py
+++ b/markdown/extensions/codehilite.py
@@ -221,7 +221,7 @@ class CodeHilite:
class HiliteTreeprocessor(Treeprocessor):
- """ Hilight source code in code blocks. """
+ """ Highlight source code in code blocks. """
def code_unescape(self, text):
"""Unescape code."""
@@ -253,7 +253,7 @@ class HiliteTreeprocessor(Treeprocessor):
class CodeHiliteExtension(Extension):
- """ Add source code hilighting to markdown codeblocks. """
+ """ Add source code highlighting to markdown codeblocks. """
def __init__(self, **kwargs):
# define default configs
diff --git a/markdown/extensions/def_list.py b/markdown/extensions/def_list.py
index 0e8e452..17549f0 100644
--- a/markdown/extensions/def_list.py
+++ b/markdown/extensions/def_list.py
@@ -87,7 +87,7 @@ class DefListProcessor(BlockProcessor):
class DefListIndentProcessor(ListIndentProcessor):
""" Process indented children of definition list items. """
- # Defintion lists need to be aware of all list types
+ # Definition lists need to be aware of all list types
ITEM_TYPES = ['dd', 'li']
LIST_TYPES = ['dl', 'ol', 'ul']
diff --git a/markdown/extensions/footnotes.py b/markdown/extensions/footnotes.py
index f6f4c85..1cc7118 100644
--- a/markdown/extensions/footnotes.py
+++ b/markdown/extensions/footnotes.py
@@ -228,7 +228,7 @@ class FootnoteBlockProcessor(BlockProcessor):
# Any content before match is continuation of this footnote, which may be lazily indented.
before = therest[:m2.start()].rstrip('\n')
fn_blocks[0] = '\n'.join([fn_blocks[0], self.detab(before)]).lstrip('\n')
- # Add back to blocks everything from begining of match forward for next iteration.
+ # Add back to blocks everything from beginning of match forward for next iteration.
blocks.insert(0, therest[m2.start():])
else:
# All remaining lines of block are continuation of this footnote, which may be lazily indented.
@@ -264,7 +264,7 @@ class FootnoteBlockProcessor(BlockProcessor):
# Any content before match is continuation of this footnote, which may be lazily indented.
before = block[:m.start()].rstrip('\n')
fn_blocks.append(self.detab(before))
- # Add back to blocks everything from begining of match forward for next iteration.
+ # Add back to blocks everything from beginning of match forward for next iteration.
blocks.insert(0, block[m.start():])
# End of this footnote.
break
@@ -355,7 +355,7 @@ class FootnotePostTreeprocessor(Treeprocessor):
self.offset = 0
for div in root.iter('div'):
if div.attrib.get('class', '') == 'footnote':
- # Footnotes shoul be under the first orderd list under
+ # Footnotes should be under the first ordered list under
# the footnote div. So once we find it, quit.
for ol in div.iter('ol'):
self.handle_duplicates(ol)
diff --git a/markdown/extensions/legacy_attrs.py b/markdown/extensions/legacy_attrs.py
index b51d778..445aba1 100644
--- a/markdown/extensions/legacy_attrs.py
+++ b/markdown/extensions/legacy_attrs.py
@@ -26,7 +26,7 @@ An extension to Python Markdown which implements legacy attributes.
Prior to Python-Markdown version 3.0, the Markdown class had an `enable_attributes`
keyword which was on by default and provided for attributes to be defined for elements
using the format `{@key=value}`. This extension is provided as a replacement for
-backward compatability. New documents should be authored using attr_lists. However,
+backward compatibility. New documents should be authored using attr_lists. However,
numerious documents exist which have been using the old attribute format for many
years. This extension can be used to continue to render those documents correctly.
"""
diff --git a/markdown/extensions/legacy_em.py b/markdown/extensions/legacy_em.py
index 7fddb77..360988b 100644
--- a/markdown/extensions/legacy_em.py
+++ b/markdown/extensions/legacy_em.py
@@ -2,7 +2,7 @@
Legacy Em Extension for Python-Markdown
=======================================
-This extention provides legacy behavior for _connected_words_.
+This extension provides legacy behavior for _connected_words_.
Copyright 2015-2018 The Python Markdown Project
diff --git a/markdown/extensions/md_in_html.py b/markdown/extensions/md_in_html.py
index 81cc15c..ff1d20f 100644
--- a/markdown/extensions/md_in_html.py
+++ b/markdown/extensions/md_in_html.py
@@ -248,7 +248,7 @@ class MarkdownInHtmlProcessor(BlockProcessor):
def parse_element_content(self, element):
"""
- Resursively parse the text content of an etree Element as Markdown.
+ Recursively parse the text content of an etree Element as Markdown.
Any block level elements generated from the Markdown will be inserted as children of the element in place
of the text content. All `markdown` attributes are removed. For any elements in which Markdown parsing has
@@ -268,7 +268,7 @@ class MarkdownInHtmlProcessor(BlockProcessor):
for child in list(element):
self.parse_element_content(child)
- # Parse Markdown text in tail of children. Do this seperate to avoid raw HTML parsing.
+ # Parse Markdown text in tail of children. Do this separate to avoid raw HTML parsing.
# Save the position of each item to be inserted later in reverse.
tails = []
for pos, child in enumerate(element):
diff --git a/markdown/extensions/tables.py b/markdown/extensions/tables.py
index 4b027bb..0a9d084 100644
--- a/markdown/extensions/tables.py
+++ b/markdown/extensions/tables.py
@@ -200,7 +200,7 @@ class TableProcessor(BlockProcessor):
if not throw_out:
good_pipes.append(pipe)
- # Split row according to table delimeters.
+ # Split row according to table delimiters.
pos = 0
for pipe in good_pipes:
elements.append(row[pos:pipe])
diff --git a/markdown/extensions/toc.py b/markdown/extensions/toc.py
index e4dc378..57d2e3b 100644
--- a/markdown/extensions/toc.py
+++ b/markdown/extensions/toc.py
@@ -365,7 +365,7 @@ class TocExtension(Extension):
self.reset()
tocext = self.TreeProcessorClass(md, self.getConfigs())
# Headerid ext is set to '>prettify'. With this set to '_end',
- # it should always come after headerid ext (and honor ids assinged
+ # it should always come after headerid ext (and honor ids assigned
# by the header id extension) if both are used. Same goes for
# attr_list extension. This must come last because we don't want
# to redefine ids after toc is created. But we do want toc prettified.