Skip to content

Commit

Permalink
fix: 修复formatFullWidthMark函数 (#655)
Browse files Browse the repository at this point in the history
* chore(*): fix issue template syntax error

* fix: 修复formatFullWidthMark函数

---------

Co-authored-by: lyngai <wlxjust@gmail.com>
  • Loading branch information
eyebrowkang and lyngai authored Nov 24, 2023
1 parent 32e8525 commit 8d34763
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ body:
id: prerequisites
attributes:
label: Prerequisites
description: Before submitting the issue, ensure the following:
description: 'Before submitting the issue, ensure the following:'
options:
- label: There isn't an existing issue that reports the same bug to avoid duplicates.
- label: The provided information offers a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/client_feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ body:
id: prerequisites
attributes:
label: Prerequisites
description: Before submitting the issue, ensure the following:
description: 'Before submitting the issue, ensure the following:'
options:
- label: There isn't an existing issue that requests the same feature, to avoid duplicates.
- type: dropdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation_feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ body:
id: prerequisites
attributes:
label: Prerequisites
description: Before submitting the issue, ensure the following:
description: 'Before submitting the issue, ensure the following:'
options:
- label: There isn't an existing issue with the same question or request to avoid duplicates.
- type: dropdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ body:
id: prerequisites
attributes:
label: Prerequisites
description: Before submitting the issue, ensure the following:
description: 'Before submitting the issue, ensure the following:'
options:
- label: There isn't an existing issue that requests the same feature, to avoid duplicates.
- type: textarea
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 🔌 vscodePlugin issue
description: About vscodePlugin issue
title: '[vscodePlugin]'
labels: [vscodePlugin]
name: 🔌 VSCode Plugin issue
description: About VSCode Plugin issue
title: '[VSCode Plugin]'
labels: [VSCode Plugin]
body:
- type: markdown
attributes:
Expand All @@ -11,7 +11,7 @@ body:
id: type
attributes:
label: issue type
description: What type of issue is this about vscodePlugin?
description: What type of issue is this about VSCode Plugin?
options:
- Bug
- Feature
Expand Down
10 changes: 6 additions & 4 deletions src/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,12 @@ export default class Editor {
let oneSearch = searcher.findNext();
// 防止出现错误的mark
editor.getAllMarks().forEach(function (mark) {
const range = JSON.parse(JSON.stringify(mark.find()));
const markedText = editor.getRange(range.from, range.to);
if (mark.className === 'cm-fullWidth' && !regex.test(markedText)) {
mark.clear();
if (mark.className === 'cm-fullWidth') {
const range = JSON.parse(JSON.stringify(mark.find()));
const markedText = editor.getRange(range.from, range.to);
if (!regex.test(markedText)) {
mark.clear();
}
}
});
for (; oneSearch !== false; oneSearch = searcher.findNext()) {
Expand Down

0 comments on commit 8d34763

Please sign in to comment.