From ec5615873974ca206b8b8ed3e73f51ceea14db19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Mon, 30 Nov 2020 00:04:30 +0100 Subject: [PATCH 1/5] add support for only checking attributes in isActive --- .eslintrc.js | 2 + docs/src/demos/Examples/Formatting/index.vue | 8 ++-- docs/src/demos/Extensions/TextAlign/index.vue | 8 ++-- packages/core/src/Editor.ts | 24 +++++----- packages/core/src/utils/isActive.ts | 45 +++++++++++++++++++ packages/core/src/utils/markHasAttributes.ts | 8 ++-- packages/core/src/utils/objectIncludes.ts | 6 +++ 7 files changed, 76 insertions(+), 25 deletions(-) create mode 100644 packages/core/src/utils/isActive.ts create mode 100644 packages/core/src/utils/objectIncludes.ts diff --git a/.eslintrc.js b/.eslintrc.js index 8e87abee..cb2a1bdf 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -66,6 +66,8 @@ module.exports = { '@typescript-eslint/no-use-before-define': ['error'], 'no-dupe-class-members': 'off', '@typescript-eslint/no-dupe-class-members': ['error'], + 'lines-between-class-members': 'off', + '@typescript-eslint/lines-between-class-members': ['error'], '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-empty-interface': 'off', '@typescript-eslint/explicit-module-boundary-type': 'off', diff --git a/docs/src/demos/Examples/Formatting/index.vue b/docs/src/demos/Examples/Formatting/index.vue index 2d54b041..d573f20e 100644 --- a/docs/src/demos/Examples/Formatting/index.vue +++ b/docs/src/demos/Examples/Formatting/index.vue @@ -19,16 +19,16 @@ - - - - diff --git a/docs/src/demos/Extensions/TextAlign/index.vue b/docs/src/demos/Extensions/TextAlign/index.vue index 0ecb20be..5c472b19 100644 --- a/docs/src/demos/Extensions/TextAlign/index.vue +++ b/docs/src/demos/Extensions/TextAlign/index.vue @@ -1,15 +1,15 @@