Documentation
¶
Overview ¶
Package mist renders a strict subset of Liquid in a single pass, bailing with ErrUnsupported on anything outside the subset so the caller can fall back to a full engine. See SPEC.md for the exact subset.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnsupported means the template is outside the subset; render it with the full engine instead. ErrUnsupported = errors.New("mist: unsupported") // ErrUndefined is a strict-mode undefined variable. The full engine fails too, though a // syntax error later in the template may take precedence there. ErrUndefined = errors.New("mist: undefined variable") )
Functions ¶
func Append ¶ added in v0.2.0
Append is Render appending to dst, so callers can reuse a buffer and render without allocating. On error out is nil.
Types ¶
type Error ¶
type Result ¶
func RenderChain ¶
RenderChain renders steps in order, binding each output into the vars seen by later steps (see SPEC.md § Chains). It stops at the first step mist can't render and returns n, its index; the caller renders steps[n:] with the full engine using the returned vars. The caller's maps are never mutated.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
mistcheck
command
Command mistcheck reports whether Liquid templates are inside the mist subset.
|
Command mistcheck reports whether Liquid templates are inside the mist subset. |
|
scripts
|
|
|
gen
command
Command gen writes random templates drawn from the SPEC.md grammar, with random data, in harvest.rb's format for oracle.mjs.
|
Command gen writes random templates drawn from the SPEC.md grammar, with random data, in harvest.rb's format for oracle.mjs. |
Click to show internal directories.
Click to hide internal directories.