mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Fix to remove unnecessary escape charactor erorr on IDE
This commit is contained in:
committed by
Junyoung Choi
parent
e402929cca
commit
edac4d3fed
@@ -159,10 +159,10 @@ 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*>?\s*[\+\-\*] \[x\]/i
|
const checkedMatch = /^\s*>?\s*[+\-*] \[x]/i
|
||||||
const uncheckedMatch = /^\s*>?\s*[\+\-\*] \[ \]/
|
const uncheckedMatch = /^\s*>?\s*[+\-*] \[ ]/
|
||||||
const checkReplace = /\[x\]/i
|
const checkReplace = /\[x]/i
|
||||||
const uncheckReplace = /\[ \]/
|
const uncheckReplace = /\[ ]/
|
||||||
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
|
||||||
const lines = this.refs.code.value
|
const lines = this.refs.code.value
|
||||||
|
|||||||
@@ -78,10 +78,10 @@ class MarkdownSplitEditor extends React.Component {
|
|||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
const idMatch = /checkbox-([0-9]+)/
|
const idMatch = /checkbox-([0-9]+)/
|
||||||
const checkedMatch = /^\s*>?\s*[\+\-\*] \[x\]/i
|
const checkedMatch = /^\s*>?\s*[+\-*] \[x]/i
|
||||||
const uncheckedMatch = /^\s*>?\s*[\+\-\*] \[ \]/
|
const uncheckedMatch = /^\s*>?\s*[+\-*] \[ ]/
|
||||||
const checkReplace = /\[x\]/i
|
const checkReplace = /\[x]/i
|
||||||
const uncheckReplace = /\[ \]/
|
const uncheckReplace = /\[ ]/
|
||||||
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
|
||||||
const lines = this.refs.code.value
|
const lines = this.refs.code.value
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ export function getTodoStatus (content) {
|
|||||||
|
|
||||||
splitted.forEach((line) => {
|
splitted.forEach((line) => {
|
||||||
const trimmedLine = line.trim().replace(/^>\s*/, '')
|
const trimmedLine = line.trim().replace(/^>\s*/, '')
|
||||||
if (trimmedLine.match(/^[\+\-\*] \[(\s|x)\] ./i)) {
|
if (trimmedLine.match(/^[+\-*] \[(\s|x)] ./i)) {
|
||||||
numberOfTodo++
|
numberOfTodo++
|
||||||
}
|
}
|
||||||
if (trimmedLine.match(/^[\+\-\*] \[x\] ./i)) {
|
if (trimmedLine.match(/^[+\-*] \[x] ./i)) {
|
||||||
numberOfCompletedTodo++
|
numberOfCompletedTodo++
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user