mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 10:46:32 +00:00
change from forEach to some
This commit is contained in:
@@ -67,7 +67,7 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
let title = null
|
let title = null
|
||||||
let isMarkdownInCode = false
|
let isMarkdownInCode = false
|
||||||
|
|
||||||
splitted.forEach((line, index) => {
|
splitted.some((line, index) => {
|
||||||
let trimmedLine = line.trim()
|
let trimmedLine = line.trim()
|
||||||
let trimmedNextLine = splitted[index + 1] === undefined ? '' : splitted[index + 1].trim()
|
let trimmedNextLine = splitted[index + 1] === undefined ? '' : splitted[index + 1].trim()
|
||||||
if (trimmedLine.match('```')) {
|
if (trimmedLine.match('```')) {
|
||||||
@@ -78,7 +78,7 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
title = trimmedLine.substring(1, trimmedLine.length).trim()
|
title = trimmedLine.substring(1, trimmedLine.length).trim()
|
||||||
}
|
}
|
||||||
return
|
return true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user