From 33eb3efb11ec0482a05d9853258b813eab24d93d Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 29 Oct 2022 01:05:33 +0200 Subject: [PATCH] Remove restriction on formatting empty block (#1178) --- novelwriter/gui/doceditor.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/novelwriter/gui/doceditor.py b/novelwriter/gui/doceditor.py index 3e4a965f..9126872b 100644 --- a/novelwriter/gui/doceditor.py +++ b/novelwriter/gui/doceditor.py @@ -1709,12 +1709,8 @@ class GuiDocEditor(QTextEdit): logger.debug("Invalid block selected for action '%s'", str(docAction)) return False - theText = theBlock.text() - if len(theText.strip()) == 0: - logger.debug("Empty block selected for action '%s'", str(docAction)) - return False - # Remove existing format first, if any + theText = theBlock.text() if theText.startswith("@"): logger.error("Cannot apply block format to keyword/value line") return False