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