Sablon.Content.String (sablon v0.4.3)

Copy Markdown View Source

Plain text insertion.

Newlines in the value are converted to w:br elements so multi-line strings keep their line breaks; every other run of text reuses the formatting of the merge field it replaces.

Summary

Functions

Builds string content from any value implementing String.Chars.

Types

t()

@type t() :: %Sablon.Content.String{string: binary()}

Functions

new(value)

@spec new(term()) :: t()

Builds string content from any value implementing String.Chars.

Anything else (a plain list, map or tuple) falls back to Elixir's inspect/1, mirroring Ruby where every object renders through to_s.