convert method

  1. @override
String convert(
  1. Document input
)
override

Converts input and returns the result of the conversion.

Implementation

@override
String convert(Document input) {
  final buffer = StringBuffer();
  for (final node in input.root.children) {
    HTMLNodeParser? parser = encodeParsers.firstWhereOrNull(
      (element) => element.id == node.type,
    );
    if (parser != null) {
      buffer.write(
        parser.transformNodeToHTMLString(
          node,
          encodeParsers: encodeParsers,
        ),
      );
    }
  }
  return buffer.toString();
}