createTableCaption function

CAPTIONElement? createTableCaption(
  1. Object? caption
)

Implementation

CAPTIONElement? createTableCaption(Object? caption) {
  var nodes = DOMNode.parseNodes(caption);
  if (nodes.isNotEmpty) {
    if (nodes.length == 1) {
      var first = nodes.first;
      if (first is CAPTIONElement) {
        return first;
      }
    }

    return CAPTIONElement(content: nodes);
  }
  return null;
}