lofi v0.1.3 Lofi.Parse
Parses Lofi content into a structure of text, tags, and mentions.
Summary
Functions
Parses Lofi content into a structure of text, tags, and mentions
Functions
Parses Lofi content into a structure of text, tags, and mentions.
Examples
iex> Lofi.Parse.parse_element("hello")
%Lofi.Element{ texts: ["hello"], tags: %{} }
iex> Lofi.Parse.parse_element("Click me #button")
%Lofi.Element{ texts: ["Click me"], tags: %{ "button" => {:flag, true} } }
iex> Lofi.Parse.parse_element("hello @first-name @last-name")
%Lofi.Element{ texts: ["hello ", " "], mentions: [["first-name"], ["last-name"]] }