formatAdmonition function

String formatAdmonition(
  1. String type,
  2. String content
)

Format an admonition/callout.

Implementation

String formatAdmonition(String type, String content) {
  // GitHub-style
  return '> [!${type.toUpperCase()}]\n> ${content.replaceAll('\n', '\n> ')}';
}