sniffMime method

String? sniffMime(
  1. String content
)

Sniffs MIME type from content.

Implementation

String? sniffMime(String content) {
  // Trim whitespace and comments
  content = _trimLeftXmlLike(content);
  if (_htmlRegExp.hasMatch(content)) {
    return 'text/html';
  }
  if (_xmlRegExp.hasMatch(content)) {
    return 'text/xml';
  }
  return null;
}