View Source Mobilizon.Service.Formatter (Mobilizon v5.0.0-beta.1)
Formats input text to structured data, extracts mentions and hashtags.
Summary
Functions
Parses a text and replace plain text links with HTML. Returns a tuple with a result text, mentions, and hashtags.
Escapes a special characters in mention names.
Functions
@spec linkify( String.t(), keyword() ) :: {String.t(), [{String.t(), Mobilizon.Actors.Actor.t()}], [{String.t(), String.t()}]}
Parses a text and replace plain text links with HTML. Returns a tuple with a result text, mentions, and hashtags.
Escapes a special characters in mention names.
@spec truncate(String.t(), non_neg_integer(), String.t()) :: String.t()