visitSymbol method

  1. @override
String visitSymbol(
  1. SymbolNode node
)
override

Implementation

@override
String visitSymbol(SymbolNode node) {
  final unicode = node.unicode;
  if (unicode.length == 1 &&
      RegExp(r'^\p{L}+$', unicode: true).hasMatch(unicode)) {
    return "<mi>${_escapeXml(unicode)}</mi>";
  } else {
    return "<mo>${_escapeXml(unicode)}</mo>";
  }
}