summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-12-12 22:56:15 +0100
committerWuzzy <almikes@aol.com>2016-12-12 22:56:15 +0100
commit88b5ca9599c22894ad5b3a26099108a1caf48af9 (patch)
tree8d1c9ddf23458d50cd5395d1baa2c8da6e81ec28 /init.lua
parent1b4c684ee47ee776f97aad27f9068693f4f38088 (diff)
Avoid double newline for custom factoids
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 3facfea..10e3b82 100644
--- a/init.lua
+++ b/init.lua
@@ -271,7 +271,9 @@ local get_custom_factoids = function(category_id, factoid_type, data)
for i=1,#ftable do
if factoid_type == nil or ftable[i].ftype == factoid_type then
datastring = datastring .. ftable[i].fgen(data.itemstring, data.def)
- datastring = newline(datastring)
+ if datastring ~= "" then
+ datastring = newline(datastring)
+ end
end
end
return datastring