Fix multimatch error. Resolves #2514
This commit is contained in:
parent
f9d686c9a4
commit
af491d9f30
2 changed files with 2 additions and 2 deletions
|
|
@ -125,7 +125,7 @@ def try_num_differentiators(raw_string):
|
||||||
# the user might be trying to identify the command
|
# the user might be trying to identify the command
|
||||||
# with a #num-command style syntax. We expect the regex to
|
# with a #num-command style syntax. We expect the regex to
|
||||||
# contain the groups "number" and "name".
|
# contain the groups "number" and "name".
|
||||||
mindex, new_raw_string = (num_ref_match.group("number"), num_ref_match.group("name"))
|
mindex, new_raw_string = (num_ref_match.group("number"), num_ref_match.group("name") + num_ref_match.group("args"))
|
||||||
return int(mindex), new_raw_string
|
return int(mindex), new_raw_string
|
||||||
else:
|
else:
|
||||||
return None, None
|
return None, None
|
||||||
|
|
|
||||||
|
|
@ -324,7 +324,7 @@ COMMAND_PARSER = "evennia.commands.cmdparser.cmdparser"
|
||||||
# parser expects this. It should also involve a number starting from 1.
|
# parser expects this. It should also involve a number starting from 1.
|
||||||
# When changing this you must also update SEARCH_MULTIMATCH_TEMPLATE
|
# When changing this you must also update SEARCH_MULTIMATCH_TEMPLATE
|
||||||
# to properly describe the syntax.
|
# to properly describe the syntax.
|
||||||
SEARCH_MULTIMATCH_REGEX = r"(?P<name>.*)-(?P<number>[0-9]+)"
|
SEARCH_MULTIMATCH_REGEX = r"(?P<name>[^-]*)-(?P<number>[0-9]+)(?P<args>.*)"
|
||||||
# To display multimatch errors in various listings we must display
|
# To display multimatch errors in various listings we must display
|
||||||
# the syntax in a way that matches what SEARCH_MULTIMATCH_REGEX understand.
|
# the syntax in a way that matches what SEARCH_MULTIMATCH_REGEX understand.
|
||||||
# The template will be populated with data and expects the following markup:
|
# The template will be populated with data and expects the following markup:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue