phoenix_slime v0.13.1 PhoenixSlime

Link to this section Summary

Functions

Provides the ~L sigil with HTML safe Slime syntax inside source files.

Provides the ~l sigil with HTML safe Slime syntax inside source files.

Link to this section Functions

Link to this macro

sigil_L(expr, opts)

(macro)

Provides the ~L sigil with HTML safe Slime syntax inside source files.

iex> import PhoenixSlime
iex> ~L"""
...> p hello #{"world"}
...> """
{:safe, ["<p>hello ", "world", "</p>"]}
Link to this macro

sigil_l(expr, opts)

(macro)

Provides the ~l sigil with HTML safe Slime syntax inside source files.

Raises on attempts to use #{}. Use ~L to allow templating with #{}.

iex> import PhoenixSlime
iex> assigns = %{w: "world"}
iex> ~l"""
...> p = "hello " <> @w
...> """
{:safe, ["<p>", "hello world", "</p>"]}