mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
fix the bug that is markdown titile starts with second letter
This commit is contained in:
@@ -73,7 +73,11 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
if (trimmedLine.match('```')) {
|
if (trimmedLine.match('```')) {
|
||||||
isMarkdownInCode = !isMarkdownInCode
|
isMarkdownInCode = !isMarkdownInCode
|
||||||
} else if (isMarkdownInCode === false && (trimmedLine.match(/^# +/) || trimmedNextLine.match('='))) {
|
} else if (isMarkdownInCode === false && (trimmedLine.match(/^# +/) || trimmedNextLine.match('='))) {
|
||||||
title = trimmedLine.substring(1, trimmedLine.length).trim()
|
if (trimmedNextLine.match('=')) {
|
||||||
|
title = trimmedLine.substring(0, trimmedLine.length).trim()
|
||||||
|
} else {
|
||||||
|
title = trimmedLine.substring(1, trimmedLine.length).trim()
|
||||||
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user