Skip to content

Commit 383de86

Browse files
spaceonewaylan
authored andcommitted
[style]: fix various typos in docstrings and comments
1 parent af38c42 commit 383de86

22 files changed

+39
-39
lines changed

markdown/blockprocessors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ class OListProcessor(BlockProcessor):
321321

322322
TAG = 'ol'
323323
# The integer (python string) with which the lists starts (default=1)
324-
# Eg: If list is intialized as)
324+
# Eg: If list is initialized as)
325325
# 3. Item
326326
# The ol tag will get starts="3" attribute
327327
STARTSWITH = '1'

markdown/extensions/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
class Extension:
2727
""" Base class for extensions to subclass. """
2828

29-
# Default config -- to be overriden by a subclass
29+
# Default config -- to be overridden by a subclass
3030
# Must be of the following format:
3131
# {
3232
# 'key': ['value', 'description']
@@ -90,9 +90,9 @@ def _extendMarkdown(self, *args):
9090

9191
def extendMarkdown(self, md):
9292
"""
93-
Add the various proccesors and patterns to the Markdown Instance.
93+
Add the various proccessors and patterns to the Markdown Instance.
9494
95-
This method must be overriden by every extension.
95+
This method must be overridden by every extension.
9696
9797
Keyword arguments:
9898

markdown/extensions/codehilite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def _parseHeader(self):
221221

222222

223223
class HiliteTreeprocessor(Treeprocessor):
224-
""" Hilight source code in code blocks. """
224+
""" Highlight source code in code blocks. """
225225

226226
def code_unescape(self, text):
227227
"""Unescape code."""
@@ -253,7 +253,7 @@ def run(self, root):
253253

254254

255255
class CodeHiliteExtension(Extension):
256-
""" Add source code hilighting to markdown codeblocks. """
256+
""" Add source code highlighting to markdown codeblocks. """
257257

258258
def __init__(self, **kwargs):
259259
# define default configs

markdown/extensions/def_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def run(self, parent, blocks):
8787
class DefListIndentProcessor(ListIndentProcessor):
8888
""" Process indented children of definition list items. """
8989

90-
# Defintion lists need to be aware of all list types
90+
# Definition lists need to be aware of all list types
9191
ITEM_TYPES = ['dd', 'li']
9292
LIST_TYPES = ['dl', 'ol', 'ul']
9393

markdown/extensions/footnotes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def run(self, parent, blocks):
228228
# Any content before match is continuation of this footnote, which may be lazily indented.
229229
before = therest[:m2.start()].rstrip('\n')
230230
fn_blocks[0] = '\n'.join([fn_blocks[0], self.detab(before)]).lstrip('\n')
231-
# Add back to blocks everything from begining of match forward for next iteration.
231+
# Add back to blocks everything from beginning of match forward for next iteration.
232232
blocks.insert(0, therest[m2.start():])
233233
else:
234234
# All remaining lines of block are continuation of this footnote, which may be lazily indented.
@@ -264,7 +264,7 @@ def detectTabbed(self, blocks):
264264
# Any content before match is continuation of this footnote, which may be lazily indented.
265265
before = block[:m.start()].rstrip('\n')
266266
fn_blocks.append(self.detab(before))
267-
# Add back to blocks everything from begining of match forward for next iteration.
267+
# Add back to blocks everything from beginning of match forward for next iteration.
268268
blocks.insert(0, block[m.start():])
269269
# End of this footnote.
270270
break
@@ -355,7 +355,7 @@ def run(self, root):
355355
self.offset = 0
356356
for div in root.iter('div'):
357357
if div.attrib.get('class', '') == 'footnote':
358-
# Footnotes shoul be under the first orderd list under
358+
# Footnotes should be under the first ordered list under
359359
# the footnote div. So once we find it, quit.
360360
for ol in div.iter('ol'):
361361
self.handle_duplicates(ol)

markdown/extensions/legacy_attrs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
Prior to Python-Markdown version 3.0, the Markdown class had an `enable_attributes`
2727
keyword which was on by default and provided for attributes to be defined for elements
2828
using the format `{@key=value}`. This extension is provided as a replacement for
29-
backward compatability. New documents should be authored using attr_lists. However,
29+
backward compatibility. New documents should be authored using attr_lists. However,
3030
numerious documents exist which have been using the old attribute format for many
3131
years. This extension can be used to continue to render those documents correctly.
3232
"""

markdown/extensions/legacy_em.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Legacy Em Extension for Python-Markdown
33
=======================================
44
5-
This extention provides legacy behavior for _connected_words_.
5+
This extension provides legacy behavior for _connected_words_.
66
77
Copyright 2015-2018 The Python Markdown Project
88

markdown/extensions/md_in_html.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def test(self, parent, block):
248248

249249
def parse_element_content(self, element):
250250
"""
251-
Resursively parse the text content of an etree Element as Markdown.
251+
Recursively parse the text content of an etree Element as Markdown.
252252
253253
Any block level elements generated from the Markdown will be inserted as children of the element in place
254254
of the text content. All `markdown` attributes are removed. For any elements in which Markdown parsing has
@@ -268,7 +268,7 @@ def parse_element_content(self, element):
268268
for child in list(element):
269269
self.parse_element_content(child)
270270

271-
# Parse Markdown text in tail of children. Do this seperate to avoid raw HTML parsing.
271+
# Parse Markdown text in tail of children. Do this separate to avoid raw HTML parsing.
272272
# Save the position of each item to be inserted later in reverse.
273273
tails = []
274274
for pos, child in enumerate(element):

markdown/extensions/tables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def _split(self, row):
200200
if not throw_out:
201201
good_pipes.append(pipe)
202202

203-
# Split row according to table delimeters.
203+
# Split row according to table delimiters.
204204
pos = 0
205205
for pipe in good_pipes:
206206
elements.append(row[pos:pipe])

markdown/extensions/toc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def extendMarkdown(self, md):
365365
self.reset()
366366
tocext = self.TreeProcessorClass(md, self.getConfigs())
367367
# Headerid ext is set to '>prettify'. With this set to '_end',
368-
# it should always come after headerid ext (and honor ids assinged
368+
# it should always come after headerid ext (and honor ids assigned
369369
# by the header id extension) if both are used. Same goes for
370370
# attr_list extension. This must come last because we don't want
371371
# to redefine ids after toc is created. But we do want toc prettified.

0 commit comments

Comments
 (0)