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:
parent
48ff941764
commit
3800a3077a
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue