Merge pull request #230 from p1otr/master
Before adoption: this commit came in with the history the project adopted, so no landing records it.
documentation typos
authored by Armin Ronacher · committed by Armin Ronacher · parents ac168ca, 3fc008b · Browse files · 5 files·+7 added−7 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+7 added−7 removed
- other:+7 added−7 removed
Provenance
- Commit
c97fa10- Tree
16195bf- Author
Armin Ronacher <armin.ronacher@active-4.com>- Committer
Armin Ronacher <armin.ronacher@active-4.com>- Parent 1
ac168ca- Parent 2
3fc008b
5 files changed+7 added−7 removed
modified:docs/api.rst+2 added-2 removed
453 unmodified lines454 This is especially useful if you have a web application that is initialized on455 the first request and Jinja compiles many templates at once which slows down456 the application.457 458-To use a bytecode cache, instanciate it and pass it to the :class:`Environment`.458+To use a bytecode cache, instantiate it and pass it to the :class:`Environment`.459 460 .. autoclass:: jinja2.BytecodeCache461 :members: load_bytecode, dump_bytecode, clear462 159 unmodified lines622 Evaluation Context623 ------------------624 625 The evaluation context (short eval context or eval ctx) is a new object626-introducted in Jinja 2.4 that makes it possible to activate and deactivate626+introduced in Jinja 2.4 that makes it possible to activate and deactivate627 compiled features at runtime.628 629 Currently it is only used to enable and disable the automatic escaping but630 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.571 unmodified lines1053 the preferred way to concatenate strings! For string concatenation have1054 a look at the ``~`` operator. ``{{ 1 + 1 }}`` is ``2``.1055 1056 \-1057- Substract the second number from the first one. ``{{ 3 - 2 }}`` is ``1``.1057+ Subtract the second number from the first one. ``{{ 3 - 2 }}`` is ``1``.1058 1059 /1060 Divide two numbers. The return value will be a floating point number.1061 ``{{ 1 / 2 }}`` is ``{{ 0.5 }}``.395 unmodified linesmodified:jinja2/nodes.py+1 added-1 removed
749 unmodified lines750 operator = '+'751 752 753 class Sub(BinExpr):754- """Substract the right from the left node."""754+ """Subtract the right from the left node."""755 operator = '-'756 757 758 class Mod(BinExpr):161 unmodified lines