api/Parser.lua

:CleanCode("code")

Arguments

"code"
string - the tag sequence to check

Notes

This takes a tag sequence that a user can enter and updates it for style purposes. e.g. [name] => [Name], [5-12] => [5 - 12]

Returns

string - the same tag sequence, corrected for style.

Example

local code = LibStub("LibDogTag-3.0"):CleanCode("[name][level]") -- "[Name Level]"

:ColorizeCode("code")

Arguments

"code"
string - the tag sequence to check

Notes

This colorizes a tag sequence by syntax to make it easier to understand. This does not correct casing or change whitespace, merely adds tags.

Returns

string - the same tag sequence, with colors applied.

Example

local code = LibStub("LibDogTag-3.0"):ColorizeCode("[Name] [5 + 17]")



Comments

Posts Quoted:
Reply
Clear All Quotes