Markua - Tag-based text markup processor, like richtext

Markua

Github | Documentation

Markua is a library for processing tags and replacing tags in text. (eg. <tag> Hello! </tag>)
You can add any tag you need and attach a callback that returns the replacement text when the tag is encountered.

You can easily create wrappers to extend the capabilities of what markua can do.
It can also be used in any luau runtime outside of roblox, as it comes with a standard library for processing tags and a roblox-specific one.

Features

  • Registering and removing tags at runtime.
  • Void tags (<tag />)
  • Tag attributes (eg. <tag a>, <tag a=b>, <tag a b c>)
  • Tag Result caching - Results for each tag can be cached per-formatter, unless the tag’s callback says otherwise.
  • Binding formatters to specific text ui.
  • Auto-updating text ui with a specific tag
  • Formatter marking. Formatters can be marked as auto-updating each frame or with custom tags that can be used to update each formatter with said tag when something changes. (eg. updating displayed keybind when the keybind changes)

Example

Installation is via the releases in the github repository.

3 Likes