Skip to content

Commit edac4d3

Browse files
Ryota KusanoRokt33r
authored andcommitted
Fix to remove unnecessary escape charactor erorr on IDE
1 parent e402929 commit edac4d3

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

browser/components/MarkdownEditor.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ class MarkdownEditor extends React.Component {
159159
e.preventDefault()
160160
e.stopPropagation()
161161
const idMatch = /checkbox-([0-9]+)/
162-
const checkedMatch = /^\s*>?\s*[\+\-\*] \[x\]/i
163-
const uncheckedMatch = /^\s*>?\s*[\+\-\*] \[ \]/
164-
const checkReplace = /\[x\]/i
165-
const uncheckReplace = /\[ \]/
162+
const checkedMatch = /^\s*>?\s*[+\-*] \[x]/i
163+
const uncheckedMatch = /^\s*>?\s*[+\-*] \[ ]/
164+
const checkReplace = /\[x]/i
165+
const uncheckReplace = /\[ ]/
166166
if (idMatch.test(e.target.getAttribute('id'))) {
167167
const lineIndex = parseInt(e.target.getAttribute('id').match(idMatch)[1], 10) - 1
168168
const lines = this.refs.code.value

browser/components/MarkdownSplitEditor.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ class MarkdownSplitEditor extends React.Component {
7878
e.preventDefault()
7979
e.stopPropagation()
8080
const idMatch = /checkbox-([0-9]+)/
81-
const checkedMatch = /^\s*>?\s*[\+\-\*] \[x\]/i
82-
const uncheckedMatch = /^\s*>?\s*[\+\-\*] \[ \]/
83-
const checkReplace = /\[x\]/i
84-
const uncheckReplace = /\[ \]/
81+
const checkedMatch = /^\s*>?\s*[+\-*] \[x]/i
82+
const uncheckedMatch = /^\s*>?\s*[+\-*] \[ ]/
83+
const checkReplace = /\[x]/i
84+
const uncheckReplace = /\[ ]/
8585
if (idMatch.test(e.target.getAttribute('id'))) {
8686
const lineIndex = parseInt(e.target.getAttribute('id').match(idMatch)[1], 10) - 1
8787
const lines = this.refs.code.value

browser/lib/getTodoStatus.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ export function getTodoStatus (content) {
55

66
splitted.forEach((line) => {
77
const trimmedLine = line.trim().replace(/^>\s*/, '')
8-
if (trimmedLine.match(/^[\+\-\*] \[(\s|x)\] ./i)) {
8+
if (trimmedLine.match(/^[+\-*] \[(\s|x)] ./i)) {
99
numberOfTodo++
1010
}
11-
if (trimmedLine.match(/^[\+\-\*] \[x\] ./i)) {
11+
if (trimmedLine.match(/^[+\-*] \[x] ./i)) {
1212
numberOfCompletedTodo++
1313
}
1414
})

0 commit comments

Comments
 (0)