DictQuickLookup:update(): strip all leading empty lines/spaces

This gets rid of sometimes huge spacing between a word and its
description taken from dictionary, and thus need for scrolling just to
read fisrs few lines of description.
This commit is contained in:
Sergey Organov committed 2016-12-01 18:03:33 +03:00
1 parent 48ff941764
commit 3800a3077a
1 file changed
+2
@@ -57,6 +57,8 @@ local function tidy_markup(results)
end
-- ignore all markup tags
def = def:gsub("%b<>", "")
-- strip all leading empty lines/spaces
def = def:gsub("^%s+", "")
result.definition = def
end
return results