File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -159,10 +159,10 @@ class MarkdownEditor extends React.Component {
159
159
e . preventDefault ( )
160
160
e . stopPropagation ( )
161
161
const idMatch = / c h e c k b o x - ( [ 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 = / \[ ] /
166
166
if ( idMatch . test ( e . target . getAttribute ( 'id' ) ) ) {
167
167
const lineIndex = parseInt ( e . target . getAttribute ( 'id' ) . match ( idMatch ) [ 1 ] , 10 ) - 1
168
168
const lines = this . refs . code . value
Original file line number Diff line number Diff line change @@ -78,10 +78,10 @@ class MarkdownSplitEditor extends React.Component {
78
78
e . preventDefault ( )
79
79
e . stopPropagation ( )
80
80
const idMatch = / c h e c k b o x - ( [ 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 = / \[ ] /
85
85
if ( idMatch . test ( e . target . getAttribute ( 'id' ) ) ) {
86
86
const lineIndex = parseInt ( e . target . getAttribute ( 'id' ) . match ( idMatch ) [ 1 ] , 10 ) - 1
87
87
const lines = this . refs . code . value
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ export function getTodoStatus (content) {
5
5
6
6
splitted . forEach ( ( line ) => {
7
7
const trimmedLine = line . trim ( ) . replace ( / ^ > \s * / , '' )
8
- if ( trimmedLine . match ( / ^ [ \ +\- \ *] \[ ( \s | x ) \ ] ./ i) ) {
8
+ if ( trimmedLine . match ( / ^ [ + \- * ] \[ ( \s | x ) ] ./ i) ) {
9
9
numberOfTodo ++
10
10
}
11
- if ( trimmedLine . match ( / ^ [ \ +\- \ *] \[ x \ ] ./ i) ) {
11
+ if ( trimmedLine . match ( / ^ [ + \- * ] \[ x ] ./ i) ) {
12
12
numberOfCompletedTodo ++
13
13
}
14
14
} )
You can’t perform that action at this time.
0 commit comments