Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihil96 committed Jun 7, 2021
1 parent cff985e commit 2066d4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modifiers/handleBlockType.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const handleBlockType = (editorState, character) => {
const line = [text.slice(0, position), character, text.slice(position)].join('');
const blockType = RichUtils.getCurrentBlockType(editorState);
for (let i = 1; i <= 6; i += 1) {
if (line.indexOf(`${sharps(i)} `) === 0 && blockType !== 'code-block') {
if (line.indexOf(`${sharps(i)} `) === 0 && blockType !== 'code-block' && i !== 3) {
return changeCurrentBlockType(editorState, blockTypes[i], line.replace(/^#+\s/, ''));
}
}
Expand Down

0 comments on commit 2066d4d

Please sign in to comment.