Skip to content

Commit

Permalink
couple of typos in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yole committed Sep 26, 2011
1 parent 345443f commit 5c5d061
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions jinja2/environment.py
Expand Up @@ -67,7 +67,7 @@ def copy_cache(cache):

def load_extensions(environment, extensions):
"""Load the extensions from the list and bind it to the environment.
Returns a dict of instanciated environments.
Returns a dict of instantiated environments.
"""
result = {}
for extension in extensions:
Expand Down Expand Up @@ -239,7 +239,7 @@ def __init__(self,
# passed by keyword rather than position. However it's important to
# not change the order of arguments because it's used at least
# internally in those cases:
# - spontaneus environments (i18n extension and Template)
# - spontaneous environments (i18n extension and Template)
# - unittests
# If parameter changes are required only add parameters at the end
# and don't change the arguments (or the defaults!) of the arguments
Expand Down Expand Up @@ -435,15 +435,15 @@ def _tokenize(self, source, name, filename=None, state=None):
return stream

def _generate(self, source, name, filename, defer_init=False):
"""Internal hook that can be overriden to hook a different generate
"""Internal hook that can be overridden to hook a different generate
method in.
.. versionadded:: 2.5
"""
return generate(source, self, name, filename, defer_init=defer_init)

def _compile(self, source, filename):
"""Internal hook that can be overriden to hook a different compile
"""Internal hook that can be overridden to hook a different compile
method in.
.. versionadded:: 2.5
Expand Down Expand Up @@ -1053,7 +1053,7 @@ def __init__(self, gen):
def dump(self, fp, encoding=None, errors='strict'):
"""Dump the complete stream into a file or file-like object.
Per default unicode strings are written, if you want to encode
before writing specifiy an `encoding`.
before writing specify an `encoding`.
Example usage::
Expand Down
8 changes: 4 additions & 4 deletions jinja2/lexer.py
Expand Up @@ -414,7 +414,7 @@ def __init__(self, environment):
(operator_re, TOKEN_OPERATOR, None)
]

# assamble the root lexing rule. because "|" is ungreedy
# assemble the root lexing rule. because "|" is ungreedy
# we have to sort by length so that the lexer continues working
# as expected when we have parsing rules like <% for block and
# <%= for variables. (if someone wants asp like syntax)
Expand Down Expand Up @@ -491,7 +491,7 @@ def __init__(self, environment):
}

def _normalize_newlines(self, value):
"""Called for strings and template data to normlize it to unicode."""
"""Called for strings and template data to normalize it to unicode."""
return newline_re.sub(self.newline_sequence, value)

def tokenize(self, source, name=None, filename=None, state=None):
Expand Down Expand Up @@ -571,7 +571,7 @@ def tokeniter(self, source, name, filename=None, state=None):
if m is None:
continue

# we only match blocks and variables if brances / parentheses
# we only match blocks and variables if braces / parentheses
# are balanced. continue parsing with the lower rule which
# is the operator rule. do this only if the end tags look
# like operators
Expand Down Expand Up @@ -669,7 +669,7 @@ def tokeniter(self, source, name, filename=None, state=None):
# publish new function and start again
pos = pos2
break
# if loop terminated without break we havn't found a single match
# if loop terminated without break we haven't found a single match
# either we are at the end of the file or we have a problem
else:
# end of text
Expand Down
2 changes: 1 addition & 1 deletion jinja2/parser.py
Expand Up @@ -223,7 +223,7 @@ def parse_block(self):
# raise a nicer error message in that case.
if self.stream.current.type == 'sub':
self.fail('Block names in Jinja have to be valid Python '
'identifiers and may not contain hypens, use an '
'identifiers and may not contain hyphens, use an '
'underscore instead.')

node.body = self.parse_statements(('name:endblock',), drop_needle=True)
Expand Down

0 comments on commit 5c5d061

Please sign in to comment.