editor: Completely remove title using the title dec button

This commit is contained in:
Eragon 2022-11-17 13:51:06 +01:00
parent 1f1a06b02d
commit 371dee1f7a
Signed by: Eragon
GPG Key ID: 087126EBFC725006
1 changed files with 2 additions and 2 deletions

View File

@ -107,9 +107,9 @@ function editor_set_title(event, level, diff)
if(count < line.length && line[count] == ' ') contents_index++;
let contents = line.slice(contents_index);
if(level > 0) {
if(level > 0 || count == 1 && diff == -1) {
/* Remove the title if the corresponding level is re-requested */
if(count == level)
if(count == level || count == 1 && diff == -1)
return contents;
/* Otherwise, add it */
else