From bd6e666fdca4ea8b5b4da31106a2f41a14912b54 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 19 Oct 2023 18:04:06 +0200 Subject: [PATCH] Add new syntax highlighting for in-line commands --- novelwriter/constants.py | 1 + novelwriter/gui/dochighlight.py | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/novelwriter/constants.py b/novelwriter/constants.py index b1855f98..066af83b 100644 --- a/novelwriter/constants.py +++ b/novelwriter/constants.py @@ -59,6 +59,7 @@ class nwRegEx: FMT_EI = r"(?{1,2}|<{1,2}$)", { @@ -351,7 +360,6 @@ class GuiDocHighlighter(QSyntaxHighlighter): if sText in ("[NEWPAGE]", "[NEW PAGE]", "[VSPACE]"): self.setFormat(0, len(text), self._hStyles["keyword"]) return - elif sText.startswith("[VSPACE:") and sText.endswith("]"): tLen = len(sText) tVal = checkInt(sText[8:-1], 0)