mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user