Skip to content

liquid.patching

module

liquid.patching

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
function

liquid.patching.patch_jinja()

Monkey-patch jinja

function

liquid.patching.unpatch_jinja()

Restore the patches to jinja