From 325bb3527cc2b8d86096985cab1091ed7ac23320 Mon Sep 17 00:00:00 2001 From: X Code Date: Sat, 18 Dec 2021 16:45:34 -0800 Subject: [PATCH] Add comments --- lib/src/models/rules/format.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/src/models/rules/format.dart b/lib/src/models/rules/format.dart index 62a41317..1a2f2e5a 100644 --- a/lib/src/models/rules/format.dart +++ b/lib/src/models/rules/format.dart @@ -16,6 +16,8 @@ abstract class FormatRule extends Rule { } } +/// Produces Delta with line-level attributes applied strictly to +/// newline characters. class ResolveLineFormatRule extends FormatRule { const ResolveLineFormatRule(); @@ -26,6 +28,8 @@ class ResolveLineFormatRule extends FormatRule { return null; } + // Apply line styles to all newline characters within range of this + // retain operation. var delta = Delta()..retain(index); final itr = DeltaIterator(document)..skip(index); Operation op; @@ -89,6 +93,7 @@ class ResolveLineFormatRule extends FormatRule { } } +/// Allows updating link format with collapsed selection. class FormatLinkAtCaretPositionRule extends FormatRule { const FormatLinkAtCaretPositionRule(); @@ -121,6 +126,8 @@ class FormatLinkAtCaretPositionRule extends FormatRule { } } +/// Produces Delta with inline-level attributes applied too all characters +/// except newlines. class ResolveInlineFormatRule extends FormatRule { const ResolveInlineFormatRule();