MDExNative.Comrak.Callout (MDExNative v0.3.2)

Copy Markdown View Source

An Obsidian callout, enabled with extension: [ofm_callouts: true].

callout_type is normalized (for example, My Type becomes my-type). metadata preserves text after | in the marker. fold is :none, :expanded (+), or :collapsed (-). A custom Markdown title is the first child, a MDExNative.Comrak.CalloutTitle; remaining children are the body.

HTML uses callout, callout-title, and callout-content classes and data-callout, data-callout-metadata, and data-callout-fold attributes. Folding requires the consuming application's CSS/JavaScript.

Summary

Types

t()

@type t() :: %MDExNative.Comrak.Callout{
  callout_type: String.t(),
  fold: :none | :expanded | :collapsed,
  metadata: String.t() | nil,
  nodes: [MDExNative.Comrak.ast_node()],
  sourcepos: term()
}