From 49049e19d8ed36d1a063a29538da8293b7348f86 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 13 Jun 2020 10:08:00 +0200 Subject: [PATCH] Moved the emphasis regexes to a constants class --- nw/constants/__init__.py | 3 ++- nw/constants/constants.py | 8 ++++++++ nw/gui/dochighlight.py | 8 ++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/nw/constants/__init__.py b/nw/constants/__init__.py index 1abd529c..57761e42 100644 --- a/nw/constants/__init__.py +++ b/nw/constants/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from nw.constants.iso import isoLanguage, isoCountry from nw.constants.constants import ( - nwConst, nwFiles, nwKeyWords, nwLabels, nwQuotes, nwUnicode + nwConst, nwRegEx, nwFiles, nwKeyWords, nwLabels, nwQuotes, nwUnicode ) from nw.constants.enum import ( nwAlert, nwDocAction, nwItemClass, nwItemLayout, nwItemType, nwOutline @@ -11,6 +11,7 @@ __all__ = [ "isoLanguage", "isoCountry", "nwConst", + "nwRegEx", "nwFiles", "nwKeyWords", "nwLabels", diff --git a/nw/constants/constants.py b/nw/constants/constants.py index 66b026fc..5c483657 100644 --- a/nw/constants/constants.py +++ b/nw/constants/constants.py @@ -34,6 +34,14 @@ class nwConst(): # END Class nwConst +class nwRegEx(): + + FMT_B = r"(?