This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
SmartText is a library for parsing hashtags & mentions from plain text input.
version 1.0.5
license BSD3
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.0.6
Committed At 2017-12-19 18:15:14 UTC
elm-lang/html 2.0.0 <= v < 3.0.0 2.0.0
elm-lang/core 5.1.1 <= v < 6.0.0 5.1.1

Modules

README

Summary

SmartText is an Elm library for parsing hashtags & mentions from plain text input.

Usage

SmartText is simple to use, it has only 1 function exposed - parse which does all the job.

It takes plain text & returns a list of Elements divided as plain text, mentions & hashtags for You to further appropriately display it.

> tweet = SmartText.parse "Sample #smart_text 👨🏻‍💻 with ❤️ by @kexoth."
[Text "Sample ",HashTag "#smart_text",Text " 👨🏻‍💻 with ❤️ by ",Mention "@kexoth",Text "."]
    : List SmartText.Element

There is also a sample program in examples/ to try it out.