escapeForTspan function

String escapeForTspan(
  1. String string
)

Implementation

String escapeForTspan(String string) {
  return string.replaceAllMapped(
    RegExp(r'[&<>]'),
    (match) => _subsForTspans[match[0]] ?? match[0]!,
  );
}