Skip to content

pristap/smart-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.

About

Parsing #hashtags & @mentions from plain text.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages