From 918b077252118e2631afdd6c234e3a4dd65e0758 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 26 Nov 2023 22:12:23 +0100 Subject: [PATCH] Drop the space in front of Synopsis and Short comments inserts --- novelwriter/gui/doceditor.py | 4 ++-- tests/test_gui/test_gui_mainmenu.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/novelwriter/gui/doceditor.py b/novelwriter/gui/doceditor.py index 5747bce8..b3948228 100644 --- a/novelwriter/gui/doceditor.py +++ b/novelwriter/gui/doceditor.py @@ -831,11 +831,11 @@ class GuiDocEditor(QPlainTextEdit): elif insert == nwDocInsert.QUOTE_RD: text = self._typDQuoteC elif insert == nwDocInsert.SYNOPSIS: - text = "% Synopsis: " + text = "%Synopsis: " newBlock = True goAfter = True elif insert == nwDocInsert.SHORT: - text = "% Short: " + text = "%Short: " newBlock = True goAfter = True elif insert == nwDocInsert.NEW_PAGE: diff --git a/tests/test_gui/test_gui_mainmenu.py b/tests/test_gui/test_gui_mainmenu.py index 980d61e9..721cc130 100644 --- a/tests/test_gui/test_gui_mainmenu.py +++ b/tests/test_gui/test_gui_mainmenu.py @@ -591,11 +591,11 @@ def testGuiMenu_Insert(qtbot, monkeypatch, nwGUI, fncPath, projPath, mockRnd): nwGUI.docEditor.setPlainText("Stuff\n") nwGUI.mainMenu.aInsSynopsis.activate(QAction.Trigger) - assert nwGUI.docEditor.getText() == "Stuff\n% Synopsis: \n" + assert nwGUI.docEditor.getText() == "Stuff\n%Synopsis: \n" nwGUI.docEditor.setPlainText("Stuff\n") nwGUI.mainMenu.aInsShort.activate(QAction.Trigger) - assert nwGUI.docEditor.getText() == "Stuff\n% Short: \n" + assert nwGUI.docEditor.getText() == "Stuff\n%Short: \n" # Insert Break or Space # =====================