Marker.Compiler (Marker v2.1.1)

View Source

Marker.Compiler renders the element macros to html. It tries do as much work during macro expansion, resulting in a run time performance comparible to precompiled templates.

For example, this element call:

div 1 + 1

will be expanded to this:

"<div>" <> Marker.Encoder.encode(1 + 1) <> "</div>"

Summary

Types

chunks()

@type chunks() :: [String.t() | Macro.t()]

element()

@type element() :: String.t() | Macro.t() | Marker.Element.t()