liquid
package
liquid
A port of liquid template engine for python on the shoulders of jinja2
Some utils
Functions
parse_tag_args
(
stream
,name
,lineno
)
(Node) — Parse arguments for a tag.</>peek_tokens
(
stream
,n
)
(list of Token) — Peek ahead 'n' tokens in the token stream, but don't move the cursor</>
Patch a couple of jinja functions to implement some featuresthat are impossible or too complex to be implemented by extensions
Including 1. Patching Parser.parse to allow 'elsif' in addition to 'elif' 2. Patching LoopContext to allow rindex and rindex0 3. Adding liquid_cycle method to LoopContext to allow cycle to have a name 4. Patching Parser.parse_for to allow arguments for tag 'for'
Functions
patch_jinja
(
)
— Monkey-patch jinja</>unpatch_jinja
(
)
— Restore the patches to jinja</>