mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-18 21:47:21 +00:00
fixed bug preventing QMs being detected
This commit is contained in:
@@ -304,7 +304,7 @@ class LoadingSurvex:
|
||||
|
||||
# QM recognizers
|
||||
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
|
||||
|
||||
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.
|
||||
"""
|
||||
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)
|
||||
if not qml:
|
||||
message = f' ! QM Unrecognised QM number in "{survexblock.survexfile.path}" line:{comment}'
|
||||
@@ -1696,9 +1698,9 @@ class LoadingSurvex:
|
||||
pass
|
||||
|
||||
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:
|
||||
self.ProcessQM(survexblock, qmcomment, comment)
|
||||
self.ProcessQM(survexblock, qmcomment, comment)
|
||||
|
||||
included = self.rx_comminc.match(comment)
|
||||
# ;|*include means 'we have been included'; whereas *include means 'proceed to include'
|
||||
|
||||
Reference in New Issue
Block a user