aboutsummaryrefslogtreecommitdiff
path: root/string2.moon
diff options
context:
space:
mode:
Diffstat (limited to 'string2.moon')
-rw-r--r--string2.moon4
1 files changed, 2 insertions, 2 deletions
diff --git a/string2.moon b/string2.moon
index 27e7122..2259272 100644
--- a/string2.moon
+++ b/string2.moon
@@ -67,7 +67,7 @@ string2 = {
-- This pattern is guaranteed to match all keywords, but also matches some other stuff.
if match str, "^_*[abdefgilnortuw][aefhilnoru][acdefiklnoprstu]*$"
for kw in *lua_keywords
- if match str, ("^_*"..kw)
+ if match str, ("^_*"..kw.."$")
str = "_"..str
return str
@@ -77,7 +77,7 @@ string2 = {
-- This pattern is guaranteed to match all keywords, but also matches some other stuff.
if match str, "^_+[abdefgilnortuw][aefhilnoru][acdefiklnoprstu]*$"
for kw in *lua_keywords
- if match str, ("^_+"..kw)
+ if match str, ("^_+"..kw.."$")
str = str\sub(2,-1)
str = gsub(str, "^_(_*%d.*)", "%1")
str = gsub(str, "_", " ")