lofi v0.1.5 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

parse_element(input)

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"]] }
parse_section(input)
parse_sections(input)