ui/richtext/bases/RichTextNumberPositive.cs

A small RichText panel class that matches positive numbers in rich text. It sets an empty Icon and uses green Color. The class is annotated with a RichTextPanel attribute containing a regex pattern to match positive numeric tokens (including percentages and units).

[RichTextPanel( @"\+(?:(?!0+(?:\.0+)?%)(\d+(?:\.\d+)?[%m]|\d*\.\d+(?![sm]\b)|\d+(?!\.?\d*[sm]\b)))" )]
public class RichTextNumberPositive : RichTextBase
{
	public override string Icon => "";
	public override Color Color => Color.Green;
}