fallback constant

ParchmentHeuristics const fallback

Default set of heuristic rules.

Rule order matters.

Implementation

static const ParchmentHeuristics fallback = ParchmentHeuristics(
  formatRules: [
    FormatLinkAtCaretPositionRule(),
    ResolveLineFormatRule(),
    ResolveInlineFormatRule(),
    // No need in catch-all rule here since the above rules cover all
    // attributes.
  ],
  insertRules: [
    // Embeds
    InsertBlockEmbedsRule(),
    ForceNewlineForInsertsAroundBlockEmbedRule(),
    // Blocks
    AutoExitBlockRule(), // must go first
    PreserveBlockStyleOnInsertRule(),
    // Lines
    PreserveLineStyleOnSplitRule(),
    PreserveLineFormatOnNewLineRule(),
    // Inlines
    PreserveInlineStylesRule(),
    // Catch-all
    CatchAllInsertRule(),
  ],
  deleteRules: [
    EnsureEmbedLineRule(),
    PreserveLineStyleOnMergeRule(),
    CatchAllDeleteRule(),
  ],
);