summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-10-09 01:56:46 +0200
committerWuzzy <almikes@aol.com>2016-10-09 01:56:46 +0200
commitc8a6a33d8b32681335a85747c88e8e5b72d06b1e (patch)
treee6fdcbb7548c501d72718b757d589b7c7267decf
parent2de3d5ecf89bed908d19ba7bb8d0f88d131d2f79 (diff)
Local functions
-rw-r--r--init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index 4493975..3df8b64 100644
--- a/init.lua
+++ b/init.lua
@@ -278,7 +278,7 @@ doc.entry_builders = {}
-- Inserts line breaks into a single paragraph and collapses all whitespace (including newlines)
-- into spaces
-function linebreaker_single(text)
+local linebreaker_single = function(text)
local linelength = 80
local remain = linelength
local res = {}
@@ -307,7 +307,7 @@ function linebreaker_single(text)
end
-- Inserts automatic line breaks into an entire text and preserves existing newlines
-function linebreaker(text)
+local linebreaker = function(text)
local out = ""
for s in string.gmatch(text, "([^\n]*)\n") do
s = linebreaker_single(s)