render method

String render(
  1. ReleaseNotes notes,
  2. ReleaseNotesFormat format
)

Renders notes into the specified format.

Implementation

String render(ReleaseNotes notes, ReleaseNotesFormat format) {
  switch (format) {
    case ReleaseNotesFormat.json:
      return const JsonEncoder.withIndent('  ').convert(notes.toJson());
    case ReleaseNotesFormat.text:
      return _renderText(notes);
    case ReleaseNotesFormat.markdown:
      return _renderMarkdown(notes);
  }
}