mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
fix linting issues
This commit is contained in:
@@ -147,7 +147,7 @@ class MarkdownEditor extends React.Component {
|
|||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
const idMatch = /checkbox-([0-9]+)/
|
const idMatch = /checkbox-([0-9]+)/
|
||||||
const checkedMatch = /^\s*[\+\-\*] \[x\]/i
|
const checkedMatch = /^\s*[\+\-\*] \[x\]/i
|
||||||
const uncheckedMatch = /^\s*[\+\-\*] \[ \]/
|
const uncheckedMatch = /^\s*[\+\-\*] \[ \]/
|
||||||
if (idMatch.test(e.target.getAttribute('id'))) {
|
if (idMatch.test(e.target.getAttribute('id'))) {
|
||||||
const lineIndex = parseInt(e.target.getAttribute('id').match(idMatch)[1], 10) - 1
|
const lineIndex = parseInt(e.target.getAttribute('id').match(idMatch)[1], 10) - 1
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ test('getTodoStatus should return a correct hash object', t => {
|
|||||||
['- [x] `- [x] a`\n', { total: 1, completed: 1 }],
|
['- [x] `- [x] a`\n', { total: 1, completed: 1 }],
|
||||||
['- [X] `- [X] a`\n', { total: 1, completed: 1 }],
|
['- [X] `- [X] a`\n', { total: 1, completed: 1 }],
|
||||||
[' \t - [X] `- [X] a`\n', { total: 1, completed: 1 }],
|
[' \t - [X] `- [X] a`\n', { total: 1, completed: 1 }],
|
||||||
[' \t - [X] `- [X] a`\n \t - [ ] `- [X] a`\n', { total: 2, completed: 1 }],
|
[' \t - [X] `- [X] a`\n \t - [ ] `- [X] a`\n', { total: 2, completed: 1 }]
|
||||||
]
|
]
|
||||||
|
|
||||||
testCases.forEach(testCase => {
|
testCases.forEach(testCase => {
|
||||||
|
|||||||
Reference in New Issue
Block a user