New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix the bug when using markdown syntax h1 #510
Conversation
An error happens
And cannot save the note. Because, I expect, this line is buggy: Probably, you should use |
let trimmedNextLine = splitted[i + 1].trim() | ||
splitted.forEach((line, index) => { | ||
let trimmedLine = line.trim() | ||
let trimmedNextLine = typeof splitted[index + 1] === 'undefined' ? '' : splitted[index + 1].trim() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use just splitted[index + 1] === undefined
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR can resolve the issue #495.
Before
After