mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 12:51:11 +00:00
fixed bug preventing QMs being detected
This commit is contained in:
@@ -304,7 +304,7 @@ class LoadingSurvex:
|
|||||||
|
|
||||||
# QM recognizers
|
# QM recognizers
|
||||||
rx_qm_digit = re.compile(r"(?i)^\s*QM(\d+)\s+(.+)$") # correct
|
rx_qm_digit = re.compile(r"(?i)^\s*QM(\d+)\s+(.+)$") # correct
|
||||||
rx_qm_detect = re.compile(r"(?i)^\s*QM\s+(\d+).*")
|
rx_qm_detect = re.compile(r"(?i)^\s*QM.*")
|
||||||
# remember there is also QM_PATTERN used in views.other and set in settings.py
|
# remember there is also QM_PATTERN used in views.other and set in settings.py
|
||||||
|
|
||||||
rx_qm = re.compile(
|
rx_qm = re.compile(
|
||||||
@@ -1654,6 +1654,8 @@ class LoadingSurvex:
|
|||||||
|
|
||||||
This _should_ also check that the first QM survey point exists in the block in this survex file.
|
This _should_ also check that the first QM survey point exists in the block in this survex file.
|
||||||
"""
|
"""
|
||||||
|
message = f' ! QM "{survexblock.survexfile.path}" line:{comment} {qml=}'
|
||||||
|
print(message, file=sys.stderr)
|
||||||
qml = self.rx_qm_digit.match(comment) # checks for valid QM digit(s)
|
qml = self.rx_qm_digit.match(comment) # checks for valid QM digit(s)
|
||||||
if not qml:
|
if not qml:
|
||||||
message = f' ! QM Unrecognised QM number in "{survexblock.survexfile.path}" line:{comment}'
|
message = f' ! QM Unrecognised QM number in "{survexblock.survexfile.path}" line:{comment}'
|
||||||
@@ -1696,7 +1698,7 @@ class LoadingSurvex:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
qmcomment= self.rx_qm_detect.match(comment)
|
qmcomment= self.rx_qm_detect.match(comment)
|
||||||
# rx_qm_detect (r"(?i)^\s*QM.*") QM fthen anything
|
# rx_qm_detect (r"(?i)^\s*QM.*") QM then anything
|
||||||
if qmcomment:
|
if qmcomment:
|
||||||
self.ProcessQM(survexblock, qmcomment, comment)
|
self.ProcessQM(survexblock, qmcomment, comment)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user