Skip to content

Fix typos #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions html5lib/filters/optionaltags.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def is_optional_start(self, tagname, previous, next):
elif tagname == 'colgroup':
# A colgroup element's start tag may be omitted if the first thing
# inside the colgroup element is a col element, and if the element
# is not immediately preceeded by another colgroup element whose
# is not immediately preceded by another colgroup element whose
# end tag has been omitted.
if type in ("StartTag", "EmptyTag"):
# XXX: we do not look at the preceding event, so instead we never
Expand All @@ -70,7 +70,7 @@ def is_optional_start(self, tagname, previous, next):
elif tagname == 'tbody':
# A tbody element's start tag may be omitted if the first thing
# inside the tbody element is a tr element, and if the element is
# not immediately preceeded by a tbody, thead, or tfoot element
# not immediately preceded by a tbody, thead, or tfoot element
# whose end tag has been omitted.
if type == "StartTag":
# omit the thead and tfoot elements' end tag when they are
Expand Down
2 changes: 1 addition & 1 deletion html5lib/html5parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2564,7 +2564,7 @@ def endTagFrameset(self, token):
self.tree.openElements.pop()
if (not self.parser.innerHTML and
self.tree.openElements[-1].name != "frameset"):
# If we're not in innerHTML mode and the the current node is not a
# If we're not in innerHTML mode and the current node is not a
# "frameset" element (anymore) then switch.
self.parser.phase = self.parser.phases["afterFrameset"]

Expand Down
2 changes: 1 addition & 1 deletion html5lib/inputstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def detectEncoding(self, parseMeta=True, chardet=True):
if encoding is None and parseMeta:
encoding = self.detectEncodingMeta()
confidence = "tentative"
# Guess with chardet, if avaliable
# Guess with chardet, if available
if encoding is None and chardet:
confidence = "tentative"
try:
Expand Down
4 changes: 2 additions & 2 deletions html5lib/tests/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
from html5lib import treebuilders
del base_path

# Build a dict of avaliable trees
# Build a dict of available trees
treeTypes = {"DOM": treebuilders.getTreeBuilder("dom")}

# Try whatever etree implementations are avaliable from a list that are
# Try whatever etree implementations are available from a list that are
#"supposed" to work
try:
import xml.etree.ElementTree as ElementTree
Expand Down
2 changes: 1 addition & 1 deletion html5lib/treebuilders/etree_lxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def insertRoot(self, token):
"""Create the document root"""
# Because of the way libxml2 works, it doesn't seem to be possible to
# alter information like the doctype after the tree has been parsed.
# Therefore we need to use the built-in parser to create our iniial
# Therefore we need to use the built-in parser to create our initial
# tree, after which we can add elements like normal
docStr = ""
if self.doctype:
Expand Down
2 changes: 1 addition & 1 deletion html5lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __getitem__(self, key):
return dict.get(self, key, self.default)


# Some utility functions to dal with weirdness around UCS2 vs UCS4
# Some utility functions to deal with weirdness around UCS2 vs UCS4
# python builds

def isSurrogatePair(data):
Expand Down
2 changes: 1 addition & 1 deletion utils/spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def updateURLs(self, tree):
except KeyError:
pass

#Remove all non-http URLs and a dd a sutiable base URL where that is
#Remove all non-http URLs and add a suitable base URL where that is
#missing
newUrls = set()
for url in urls:
Expand Down