fix crash on illegal text input

(ok it's probably the wrong way)
This commit is contained in:
Vanessa Ezekowitz 2013-12-30 00:46:09 -05:00
parent 651fea2a00
commit 9f8e99ea95

View File

@ -211,6 +211,7 @@ local fences_with_sign = { }
local function split_lines_and_words(text) local function split_lines_and_words(text)
local lines = { } local lines = { }
local line = { } local line = { }
if not text then return end
for word in text:gmatch("%S+") do for word in text:gmatch("%S+") do
if word == "|" then if word == "|" then
table.insert(lines, line) table.insert(lines, line)