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.
pull/2390/head
Sergey Organov 8 years ago
parent 48ff941764
commit 3800a3077a

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

Loading…
Cancel
Save