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 2016-12-01 15:34:40 +03:00
commit 3800a3077a

View file

@ -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