From 17dfd248640caae5eecc13be8974378c39953f39 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 26 Sep 2018 13:59:42 -0700 Subject: Added field to remember text methods. --- containers.lua | 1 + containers.moon | 1 + 2 files changed, 2 insertions(+) diff --git a/containers.lua b/containers.lua index 2018581..1490a85 100644 --- a/containers.lua +++ b/containers.lua @@ -455,6 +455,7 @@ do setmetatable(text_methods, { __index = string2 }) + getmetatable("").__methods = text_methods getmetatable("").__index = function(self, i) if type(i) == 'number' then return sub(self, i, i) diff --git a/containers.moon b/containers.moon index f8f678c..3c78037 100644 --- a/containers.moon +++ b/containers.moon @@ -181,6 +181,7 @@ do setmetatable(text_methods, {__index:string2}) + getmetatable("").__methods = text_methods getmetatable("").__index = (i)=> -- Use [] for accessing text characters, or s[{3,4}] for s:sub(3,4) if type(i) == 'number' then return sub(@, i, i) -- cgit v1.2.3