From 6bca75b8772aa229bc1d7fcf547c639ef6b25ab8 Mon Sep 17 00:00:00 2001 From: Philip Sargent <philip.sargent@gmail.com> Date: Wed, 2 Aug 2023 13:41:12 +0300 Subject: [PATCH] NOEDIT fixed --- core/views/expo.py | 3 +-- parsers/survex.py | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/core/views/expo.py b/core/views/expo.py index 9f69ccb..bf54f61 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -179,12 +179,11 @@ def expowebpage(request, expowebpath, path): (title,) = m.groups() else: title = "" - m = re.search(r"^<meta([^>]*)noedit", head, re.DOTALL + re.IGNORECASE) + m = re.search(r"noedit", head, re.DOTALL + re.IGNORECASE) if m: editable = False else: editable = os.access(expowebpath / path, os.W_OK) # are file permissions writeable? - has_menu = False menumatch = re.match(r'(.*)<ul id="links">', body, re.DOTALL + re.IGNORECASE) if menumatch: diff --git a/parsers/survex.py b/parsers/survex.py index 0d13c4d..bc1efd9 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -972,7 +972,10 @@ class LoadingSurvex: survexleg = None def LoadSurvexRef(self, survexblock, args): - """Interpret the *ref record, and all the many variants""" + """Interpret the *ref record, and all the many variants + the 'letter' was X for electronic wallets but we no longer do this. So the code + that handles 'letter' can be removed. + """ # print(self.insp+ "*REF ---- '"+ args +"'") url = get_offending_filename(survexblock.survexfile.path) # *REF but also ; Ref years from 1960 to 2039 @@ -1002,6 +1005,9 @@ class LoadingSurvex: letterx = "" else: letterx = "X" + message = f" ! Wallet *REF has LETTER in '{survexblock.survexfile.path}' malformed id '{args}' {perps}" + print(self.insp + message) + stash_data_issue(parser="survex", message=message, url=url) if len(wallet) < 2: wallet = "0" + wallet if not (int(yr) > 1960 and int(yr) < 2050):