fix a bunch of typos in the documentation
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Jakub Wilk · committed by Piotr Ożarowski · parent 073fdc0 · Browse files · 6 files·+8 added−8 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+8 added−8 removed
- other:+8 added−8 removed
Provenance
- Commit
3fc008b- Tree
f43a190- Author
Jakub Wilk <jwilk@debian.org>- Committer
Piotr Ożarowski <piotr@debian.org>- Parent
073fdc0
6 files changed+8 added−8 removed
modified:docs/api.rst+2 added-2 removed
448 unmodified lines449 This is especially useful if you have a web application that is initialized on450 the first request and Jinja compiles many templates at once which slows down451 the application.452 453-To use a bytecode cache, instanciate it and pass it to the :class:`Environment`.453+To use a bytecode cache, instantiate it and pass it to the :class:`Environment`.454 455 .. autoclass:: jinja2.BytecodeCache456 :members: load_bytecode, dump_bytecode, clear457 159 unmodified lines617 Evaluation Context618 ------------------619 620 The evaluation context (short eval context or eval ctx) is a new object621-introducted in Jinja 2.4 that makes it possible to activate and deactivate621+introduced in Jinja 2.4 that makes it possible to activate and deactivate622 compiled features at runtime.623 624 Currently it is only used to enable and disable the automatic escaping but625 can be used for extensions as well.165 unmodified linesmodified:docs/extensions.rst+1 added-1 removed
211 unmodified lines212 ------------------213 214 .. module:: jinja2.ext215 216-By writing extensions you can add custom tags to Jinja2. This is a non trival216+By writing extensions you can add custom tags to Jinja2. This is a non-trivial217 task and usually not needed as the default tags and expressions cover all218 common use cases. The i18n extension is a good example of why extensions are219 useful, another one would be fragment caching.220 127 unmodified linesmodified:docs/sandbox.rst+1 added-1 removed
52 unmodified lines53 ---------------------54 55 .. versionadded:: 2.656 57-For maximum performace Jinja2 will let operators call directly the type57+For maximum performance Jinja2 will let operators call directly the type58 specific callback methods. This means that it's not possible to have this59 intercepted by overriding :meth:`Environment.call`. Furthermore a60 conversion from operator to special method is not always directly possible61 due to how operators work. For instance for divisions more than one33 unmodified linesmodified:docs/templates.rst+2 added-2 removed
472 unmodified lines473 include characters that affect the resulting HTML. There are two approaches:474 manually escaping each variable or automatically escaping everything by default.475 476 Jinja supports both, but what is used depends on the application configuration.477-The default configuaration is no automatic escaping for various reasons:477+The default configuration is no automatic escaping for various reasons:478 479 - escaping everything except of safe values will also mean that Jinja is480 escaping variables known to not include HTML such as numbers which is481 a huge performance hit.550 unmodified lines1032 the preferred way to concatenate strings! For string concatenation have1033 a look at the ``~`` operator. ``{{ 1 + 1 }}`` is ``2``.1034 1035 \-1036- Substract the second number from the first one. ``{{ 3 - 2 }}`` is ``1``.1036+ Subtract the second number from the first one. ``{{ 3 - 2 }}`` is ``1``.1037 1038 /1039 Divide two numbers. The return value will be a floating point number.1040 ``{{ 1 / 2 }}`` is ``{{ 0.5 }}``.395 unmodified linesmodified:docs/tricks.rst+1 added-1 removed
13 unmodified lines14 15 Jinja2 supports dynamic inheritance and does not distinguish between parent16 and child template as long as no `extends` tag is visited. While this leads17 to the surprising behavior that everything before the first `extends` tag18-including whitespace is printed out instead of being igored, it can be used18+including whitespace is printed out instead of being ignored, it can be used19 for a neat trick.20 21 Usually child templates extend from one template that adds a basic HTML22 skeleton. However it's possible put the `extends` tag into an `if` tag to78 unmodified linesmodified:jinja2/nodes.py+1 added-1 removed
741 unmodified lines742 operator = '+'743 744 745 class Sub(BinExpr):746- """Substract the right from the left node."""746+ """Subtract the right from the left node."""747 operator = '-'748 749 750 class Mod(BinExpr):161 unmodified lines