Liking cljdoc? Tell your friends :D

selmer.filter-parser

Accessors are separated by dots like {{ foo.bar.0 }} which gets translated into (get-in context-map [:foo :bar 0]). So you can nest vectors and maps in your context-map.

Filters can be applied by separating then from the accessor with pipes: {{ foo|lower|capitalize }}. They are applied one after the other from left to right. Arguments can be passed to a filter separated by colons: {{ foo|pluralize:y:ies }}. If an argument includes spaces you can enclose it with doublequotes or colons: {{ foo|join:", " }}.

You can escape doublequotes inside doublequotes. And you can put colons inside doublequotes which will be ignored for the purpose of separating arguments.

Accessors are separated by dots like {{ foo.bar.0 }}
which gets translated into (get-in context-map [:foo :bar 0]). So you
can nest vectors and maps in your context-map.

Filters can be applied by separating then from the accessor
with pipes: {{ foo|lower|capitalize }}. They are applied one after
the other from left to right. Arguments can be passed to a filter
separated by colons: {{ foo|pluralize:y:ies }}. If an argument includes
spaces you can enclose it with doublequotes or colons: {{ foo|join:", " }}.

You can escape doublequotes inside doublequotes. And you can put colons
inside doublequotes which will be ignored for the purpose of separating
arguments.
raw docstring

selmer.filters

To create a filter use the function add-filter! which takes a name and a fn. The first argument to the fn is always the value obtained from the context map. The rest of the arguments are optional and are always strings.

To create a filter use the function add-filter! which takes a name and a fn.
The first argument to the fn is always the value obtained from the context
map. The rest of the arguments are optional and are always strings.
raw docstring

selmer.node

Node protocol for the objects that get accum'd in the post-parse vector. Same vector that will be processed by the runtime context-aware renderer. Currently only TextNodes and FunctionNodes. Anything that requires action upon context map data at runtime is handled by a generated anonymous function.

 Node protocol for the objects that get accum'd in the post-parse vector.
Same vector that will be processed by the runtime context-aware renderer.
Currently only TextNodes and FunctionNodes. Anything that requires action
upon context map data at runtime is handled by a generated anonymous function. 
raw docstring

selmer.parser

Parsing and handling of compile-time vs. run-time. Avoiding unnecessary work by pre-processing the template structure and content and reacting to the runtime context map with a prepared data structure instead of a raw template. Anything other than a raw tag value injection is a runtime dispatch fn. Compile-time here means the first time we see a template at runtime, not the implementation's compile-time.

 Parsing and handling of compile-time vs.
run-time. Avoiding unnecessary work by pre-processing
the template structure and content and reacting to
the runtime context map with a prepared data structure
instead of a raw template. Anything other than a raw tag
value injection is a runtime dispatch fn. Compile-time here
means the first time we see a template *at runtime*, not the
implementation's compile-time. 
raw docstring

selmer.template-parser

Where we preprocess the inheritance and mixin components of the templates. These are presumed to be static and we only aggregate them on the first template render. The compile-time tag parsing routines happen on a flat string composed from the result of extends inheritance and include mixins.

 Where we preprocess the inheritance and mixin components of the templates.
These are presumed to be static and we only aggregate them on the first
template render. The compile-time tag parsing routines happen on a flat string
composed from the result of `extends` inheritance and `include` mixins. 
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close