-
-
Notifications
You must be signed in to change notification settings - Fork 346
Notify space after regex $ #4525
Copy link
Copy link
Closed
Labels
bounty-100see https://wiki.mudlet.org/w/Bounty_Processsee https://wiki.mudlet.org/w/Bounty_Processbounty-paidThis bounty has been completed & paid outThis bounty has been completed & paid outgood first issue💎 Bounty💰 Rewarded
Description
Brief summary of issue / Description of requested feature:
excess whitespace after regex "line end" character breaks patterns invisibly
Steps to reproduce the issue / Reasons for adding feature:
- player asked in Discord, why does alias not work
- player suspected pattern wrong, because command wasn't recognized, but sent to game instead
- building the same alias anew with same pattern worked fine indeed
- nobody noticed there was an excess space character after the original pattern (besides demonnic who assumed such)
Error output / Expected result of feature
activate alias with excess whitespace, but show hint above "did you really want to do that?"
Extra information, such as Mudlet version, operating system and ideas for how to solve / implement:
same goes for triggers, etc. all places with regex and not only alias like this example.
excess space can sometimes happen unintentionally when copy/pasting..
example alias:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.001">
<AliasPackage>
<Alias isActive="yes" isFolder="no">
<name>Wavecall Distance</name>
<script>send("invoke wavecall " .. matches[2] .. " " .. matches[3])
--I want to type wcn5 and have it send "invoke wavecall n 5"</script>
<command></command>
<packageName></packageName>
<regex>^wc(\w+)(\d+)$ </regex>
</Alias>
</AliasPackage>
</MudletPackage>Can't be recognized in screenshot:

Workaround: click at the end of pattern line and "mark all" (Ctrl+A):

You could then see there is too much white space, should be like this instead:

Or just have people copy/paste their alias in chat for comparison
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bounty-100see https://wiki.mudlet.org/w/Bounty_Processsee https://wiki.mudlet.org/w/Bounty_Processbounty-paidThis bounty has been completed & paid outThis bounty has been completed & paid outgood first issue💎 Bounty💰 Rewarded