transmute v0.1.0 Transmute.Plugin.Html
Link to this section Summary
Functions
Callback implementation for Transmute.Plugin.Behaviour.context/2
.
Callback implementation for Transmute.Plugin.Behaviour.key/0
.
Callback implementation for Transmute.Plugin.Behaviour.root_context/1
.
Transforms a tag into an IO list.
Link to this section Functions
Link to this function
attribute(arg)
Link to this function
attributes(attrs)
Link to this function
context(arg1, ctx)
Callback implementation for Transmute.Plugin.Behaviour.context/2
.
Link to this function
escape(str)
Link to this function
indent(map)
Link to this function
indent(x, ctx)
Link to this function
key()
Callback implementation for Transmute.Plugin.Behaviour.key/0
.
Link to this function
newline(arg1)
Link to this function
root_context(opts)
Callback implementation for Transmute.Plugin.Behaviour.root_context/1
.
Link to this function
transform(node, ctx)
Transforms a tag into an IO list.
iex> alias Transmute.Logic
...> node = {:tag, %{name: "a", attrs: [href: "/home"]}, "Hi"}
...> ctx = %{depth: 2, indent: " "}
...> transform(node, ctx) |> Logic.to_iodata() |> IO.iodata_to_binary()
~s( <a href="/home">\n Hi\n </a>\n)