fallback constant
NotusHeuristics
const fallback
Default set of heuristic rules.
Rule order matters.
Implementation
static const NotusHeuristics fallback = NotusHeuristics(
formatRules: [
FormatLinkAtCaretPositionRule(),
ResolveLineFormatRule(),
ResolveInlineFormatRule(),
// No need in catch-all rule here since the above rules cover all
// attributes.
],
insertRules: [
// Embeds
InsertEmbedsRule(),
ForceNewlineForInsertsAroundEmbedRule(),
// Blocks
AutoExitBlockRule(), // must go first
PreserveBlockStyleOnInsertRule(),
// Lines
PreserveLineStyleOnSplitRule(),
ResetLineFormatOnNewLineRule(),
// Inlines
AutoFormatLinksRule(),
PreserveInlineStylesRule(),
// Catch-all
CatchAllInsertRule(),
],
deleteRules: [
EnsureEmbedLineRule(),
PreserveLineStyleOnMergeRule(),
CatchAllDeleteRule(),
],
);