diff options
| author | 2020-01-03 06:59:22 +0000 | |
|---|---|---|
| committer | 2020-01-03 06:59:22 +0000 | |
| commit | e9f82fc6450a40b55bcfb1d8f55e0d00ac03f703 (patch) | |
| tree | a2c8ded30be1fc921e7a378bd4433fe0485286e6 /src/utils/parse.py | |
| parent | reword karma to "<target> now has 3 karma (1 from <sender>)" (diff) | |
| signature | ||
sort variable $names descending so longer ones are caught first
Diffstat (limited to 'src/utils/parse.py')
| -rw-r--r-- | src/utils/parse.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/parse.py b/src/utils/parse.py index fe26d7aa..c0740785 100644 --- a/src/utils/parse.py +++ b/src/utils/parse.py @@ -122,6 +122,10 @@ def timed_args(args, min_args): def format_tokens(s: str, names: typing.List[str], sigil: str="$" ) -> typing.List[typing.Tuple[int, str]]: + names = names.copy() + names.sort() + names.reverse() + i = 0 max = len(s)-1 sigil_found = False |
