Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: rename compare to test

Lucas.Xu8855822fd16a
diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/text_node_extensions.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/text_node_extensions.dart
index 3ca8c89f21..119cbae8d2 100644
--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/text_node_extensions.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/text_node_extensions.dart
@@ -56,7 +56,7 @@ extension TextNodeExtension on TextNode {
bool allSatisfyInSelection(
String styleKey,
Selection selection,
- bool Function(dynamic value) compare,
+ bool Function(dynamic value) test,
) {
final ops = delta.whereType<TextInsert>();
final startOffset =
@@ -72,7 +72,7 @@ extension TextNodeExtension on TextNode {
if (start < endOffset && start + length > startOffset) {
if (op.attributes == null ||
!op.attributes!.containsKey(styleKey) ||
- !compare(op.attributes![styleKey])) {
+ !test(op.attributes![styleKey])) {
return false;
}
}