From f89d85cc4ed3bc0e530329bc0dd5cd9c714ad591 Mon Sep 17 00:00:00 2001 From: YangQi Date: Tue, 23 Aug 2022 22:16:44 +0800 Subject: [PATCH] fix: abnormal hyperlink (#189) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复在某种选中模式下,超链接格式逆位 --- src/views/CodemirrorEditor.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/views/CodemirrorEditor.vue b/src/views/CodemirrorEditor.vue index 6bcdb63..3f4038b 100644 --- a/src/views/CodemirrorEditor.vue +++ b/src/views/CodemirrorEditor.vue @@ -465,12 +465,14 @@ export default { start = anchor end = head } - } else if (head.line < anchor.line) { - start = head - end = anchor } else { - start = head - end = anchor + if (head.line < anchor.line) { + start = head + end = anchor + } else { + start = anchor + end = head + } } const rows = []