Liking cljdoc? Tell your friends :D

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

add-nodeclj

(add-node template buf rdr)
source

add-tag!cljmacro

(add-tag! k handler & tags)

tag name, fn handler, and maybe tags

 tag name, fn handler, and maybe tags 
sourceraw docstring

append-nodeclj

(append-node content tag buf rdr)
source

cache-off!clj

(cache-off!)
source

cache-on!clj

(cache-on!)
source

cache?clj

source

ensure-listclj

(ensure-list list-maybe)

Turns the argument into a list if it isn't a list already.

Turns the argument into a list if it isn't a list already.
sourceraw docstring

expr-tagclj

(expr-tag {:keys [tag-name args]} rdr)
source

filter-tagclj

(filter-tag {:keys [tag-value]})

Compile-time parser of var tag filters.

 Compile-time parser of var tag filters. 
sourceraw docstring

known-variablesclj

(known-variables input)
source

parseclj

(parse parse-fn
       input
       &
       [{:keys [tag-open tag-close filter-open filter-close tag-second
                short-comment-second]
         :or {tag-open *tag-open*
              tag-close *tag-close*
              filter-open *filter-open*
              filter-close *filter-close*
              tag-second *tag-second*
              short-comment-second *short-comment-second*}
         :as params}])
source

parse*clj

(parse* input)
source

parse-fileclj

(parse-file file params)
source

parse-inputclj

(parse-input input & [{:keys [custom-tags custom-filters]}])
source

parse-tagclj

(parse-tag {:keys [tag-type] :as tag} rdr)
source

remove-tag!clj

(remove-tag! k)
source

renderclj

(render s context-map & [opts])

render takes the string, the context-map and possibly also opts.

 render takes the string, the context-map and possibly also opts. 
sourceraw docstring

render-fileclj

(render-file filename-or-url
             context-map
             &
             [{:keys [cache custom-resource-path url-stream-handler]
               :or {cache (clojure.core/deref cache?)
                    custom-resource-path *custom-resource-path*
                    url-stream-handler *url-stream-handler*}
               :as opts}])

Parses files if there isn't a memoized post-parse vector ready to go, renders post-parse vector with passed context-map regardless. Double-checks last-modified on files. Uses classpath for filename-or-url path

 Parses files if there isn't a memoized post-parse vector ready to go,
renders post-parse vector with passed context-map regardless. Double-checks
last-modified on files. Uses classpath for filename-or-url path 
sourceraw docstring

render-templateclj

(render-template template context-map)

vector of ^selmer.node.INodes and a context map.

 vector of ^selmer.node.INodes and a context map.
sourceraw docstring

set-closing-tags!clj

(set-closing-tags! & tags)
source

set-resource-path!clj

(set-resource-path! path)

set custom location, where templates are being searched for. path may be a java.net.URL instance or a string. If it's a string, we first try to convert it to a java.net.URL instance and if it doesn't work it's interpreted as a path in the local filesystem.

set custom location, where templates are being searched for. path
may be a java.net.URL instance or a string. If it's a string, we
first try to convert it to a java.net.URL instance and if it doesn't
work it's interpreted as a path in the local filesystem.
sourceraw docstring

skip-short-comment-tagclj

(skip-short-comment-tag rdr)
source

tag-contentclj

(tag-content rdr start-tag & end-tags)

Parses the content of a tag. Returns a map of tag-name -> args & content, which can then be interpreted by the calling function.

Parses the content of a tag.
Returns a map of tag-name -> args & content, which can then be interpreted by the calling function.
sourceraw docstring

templatesclj

source

update-tagclj

(update-tag tag-map tag tags)
source

update-tagsclj

(update-tags tag tags content args buf)

Assocs in the passed tag to the tags map.

Assocs in the passed tag to the tags map.
sourceraw docstring

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

× close