3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-23 12:29:27 +01:00

Remove dash from factoid variable identifier naming

This commit is contained in:
Pragmatic Software 2018-01-23 13:58:35 -08:00
parent 7e061741da
commit 920747e86a

View File

@ -413,7 +413,7 @@ sub expand_factoid_vars {
my $matches = 0;
$action =~ s/\$0/$root_keyword/g;
my $const_action = $action;
while ($const_action =~ /(\ba\s*|\ban\s*)?(?<!\\)\$([a-zA-Z0-9_:\-#\[\]]+)/gi) {
while ($const_action =~ /(\ba\s*|\ban\s*)?(?<!\\)\$([a-zA-Z0-9_:#\[\]]+)/gi) {
my ($a, $v) = ($1, $2);
$v =~ s/(.):$/$1/;
next if $v =~ m/^[\W_]/; # special character prefix skipped for shell/code-factoids/etc