render method

String render(
  1. String text
)

Parses tagged text and renders it with ANSI escape codes.

This is the main entry point for converting tagged text to styled output.

Implementation

String render(String text) {
  if (!text.contains('<')) return text;

  final segments = parse(text);
  return _renderSegments(segments, Style());
}