From ab116d4d8fc07332710c912c0bb3c3243a387504 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 18 Jan 2019 20:39:05 -0800 Subject: [PATCH] Fixed extra return value. --- containers.lua | 8 ++++++-- containers.moon | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/containers.lua b/containers.lua index 5b406de..85f201c 100644 --- a/containers.lua +++ b/containers.lua @@ -420,8 +420,12 @@ do local text_methods = { formatted_with = format, byte = byte, - position_of = find, - position_of_1_after = find, + position_of = (function(...) + return (find(...)) + end), + position_of_1_after = (function(...) + return (find(...)) + end), as_a_lua_identifier = as_lua_id, is_a_lua_identifier = is_lua_id, as_a_lua_id = as_lua_id, diff --git a/containers.moon b/containers.moon index 3e7b1a8..e0a4b07 100644 --- a/containers.moon +++ b/containers.moon @@ -169,7 +169,8 @@ do string2 = require 'string2' {:lines, :line, :line_at, :as_lua_id, :is_lua_id} = string2 text_methods = - formatted_with:format, byte:byte, position_of:find, position_of_1_after:find, + formatted_with:format, byte:byte, + position_of:((...)->(find(...))), position_of_1_after:((...)->(find(...))), as_a_lua_identifier: as_lua_id, is_a_lua_identifier: is_lua_id, as_a_lua_id: as_lua_id, is_a_lua_id: is_lua_id, bytes_1_to: (start, stop)=> List{byte(tostring(@), start, stop)}