format static method

String format(
  1. String html,
  2. ContentFormat format
)

Format content according to the specified format

Implementation

static String format(String html, ContentFormat format) {
  switch (format) {
    case ContentFormat.plainText:
      return toPlainText(html);
    case ContentFormat.markdown:
      return toMarkdown(html);
    case ContentFormat.cleanHtml:
      return toCleanHtml(html);
    case ContentFormat.readable:
      return toReadableContent(html);
  }
}