aboutsummaryrefslogtreecommitdiff
path: root/nomsu.lua
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-09-14 05:14:28 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-09-14 05:14:28 -0700
commitbe55821244bfa066e150d33490445a16d31d92b9 (patch)
treef2ad0c155aabf9f1304dabaa1a402bafcef8d4de /nomsu.lua
parente8dd820b8c0572be9a2a99b4c3409678ac850575 (diff)
Fixed invocation function to canonicalize better and play nice with "'"
Diffstat (limited to 'nomsu.lua')
-rw-r--r--nomsu.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/nomsu.lua b/nomsu.lua
index 01fef74..0bd2752 100644
--- a/nomsu.lua
+++ b/nomsu.lua
@@ -208,12 +208,12 @@ do
local arg_names
for _index_0 = 1, #text do
local _text = text[_index_0]
- local invocation = _text:gsub("%%%S+", "%%")
+ local invocation = _text:gsub("'", " '"):gsub("%%%S+", "%%"):gsub("%s+", " ")
local _arg_names
do
local _accum_0 = { }
local _len_0 = 1
- for arg in _text:gmatch("%%(%S+)") do
+ for arg in _text:gmatch("%%(%S[^%s']*)") do
_accum_0[_len_0] = arg
_len_0 = _len_0 + 1
end