diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..5773d4e4 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,11 @@ +# https://editorconfig.org + +root = true + +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 +indent_style = space +indent_size = 4 diff --git a/backend/reconcile/src/operation_transformation/cursor.rs b/backend/reconcile/src/operation_transformation/cursor.rs index 0f2ee509..c17f560c 100644 --- a/backend/reconcile/src/operation_transformation/cursor.rs +++ b/backend/reconcile/src/operation_transformation/cursor.rs @@ -6,8 +6,8 @@ use serde::{Deserialize, Serialize}; use super::merge_context::MergeContext; use crate::operation_transformation::Operation; -// CursorPosition is a wrapper around usize to represent the position of an -// identifiable cursor in a text document based on the character index. +// CursorPosition represents the position of an identifiable cursor in a text +// document based on its (UTF-8) character index. #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[derive(Debug, Clone, PartialEq, Default)] pub struct CursorPosition { diff --git a/backend/reconcile/tests/examples/10.yml b/backend/reconcile/tests/examples/10.yml index 5b2183dc..0ee73838 100644 --- a/backend/reconcile/tests/examples/10.yml +++ b/backend/reconcile/tests/examples/10.yml @@ -2,4 +2,3 @@ parent: marketplace left: market| place right: market|space expected: market| placemarket|space - \ No newline at end of file diff --git a/backend/reconcile/tests/examples/11.yml b/backend/reconcile/tests/examples/11.yml index 549717de..d576c04d 100644 --- a/backend/reconcile/tests/examples/11.yml +++ b/backend/reconcile/tests/examples/11.yml @@ -1,4 +1,4 @@ parent: Please remember to bring your laptop and charger left: Please remember to bring your laptop| right: Please remember to bring your |new |laptop and charger -expected: Please remember to bring your |new |laptop| \ No newline at end of file +expected: Please remember to bring your |new |laptop| diff --git a/backend/reconcile/tests/examples/5.yml b/backend/reconcile/tests/examples/5.yml index b1f3f45d..aac8a98c 100644 --- a/backend/reconcile/tests/examples/5.yml +++ b/backend/reconcile/tests/examples/5.yml @@ -1,4 +1,4 @@ parent: Send the report to the team left: Send the |detailed |report to the |entire |team right: Send the |quarterly |detailed |report to the team -expected: Send the |detailed |quarterly |detailed ||report to the |entire |team \ No newline at end of file +expected: Send the |detailed |quarterly |detailed ||report to the |entire |team