From: Vanessa Dannenberg Date: Sun, 22 Sep 2019 02:04:24 +0000 (-0400) Subject: fix empty lines being skipped X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=e4336e320c8547abcd009aa52151f834470e3d3a;p=signs_lib.git fix empty lines being skipped --- diff --git a/api.lua b/api.lua index 2b51d77..7414cec 100644 --- a/api.lua +++ b/api.lua @@ -665,7 +665,7 @@ end function signs_lib.split_lines_and_words(text) if not text then return end local lines = { } - for _, line in ipairs(text:split("\n")) do + for _, line in ipairs(text:split("\n", true)) do table.insert(lines, line:split(" ")) end return lines