diff --git a/base b/base index 53ff64833..5c3978a80 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit 53ff64833621a1d85c04111ac7c05094f585fe0d +Subproject commit 5c3978a802f2e2bc0a92d938c048a4c11c7800b9 diff --git a/frontend/apps/reader/modules/readerhighlight.lua b/frontend/apps/reader/modules/readerhighlight.lua index 35225d408..fdaf877ad 100644 --- a/frontend/apps/reader/modules/readerhighlight.lua +++ b/frontend/apps/reader/modules/readerhighlight.lua @@ -783,17 +783,19 @@ function ReaderHighlight:viewSelectionHTML(debug_view) end if self.selected_text and self.selected_text.pos0 and self.selected_text.pos1 then -- For available flags, see the "#define WRITENODEEX_*" in crengine/src/lvtinydom.cpp - local html_flags = 0x3030 -- valid and classic displayed HTML, with only block nodes indented + -- Start with valid and classic displayed HTML (with only block nodes indented), + -- including styles found in , and linked CSS files content. + local html_flags = 0x6030 if not debug_view then debug_view = 0 end if debug_view == 1 then -- Each node on a line, with markers and numbers of skipped chars and siblings shown, -- with possibly invalid HTML (text nodes not escaped) - html_flags = 0x3353 + html_flags = 0x635A elseif debug_view == 2 then -- Additionally see rendering methods and unicode codepoint of each char - html_flags = 0x3757 + html_flags = 0x675E end local html, css_files = self.ui.document:getHTMLFromXPointers(self.selected_text.pos0, self.selected_text.pos1, html_flags, true) diff --git a/frontend/apps/reader/modules/readerlink.lua b/frontend/apps/reader/modules/readerlink.lua index fb49de393..2e95bdf98 100644 --- a/frontend/apps/reader/modules/readerlink.lua +++ b/frontend/apps/reader/modules/readerlink.lua @@ -1064,13 +1064,15 @@ function ReaderLink:showAsFootnotePopup(link, neglect_current_location) -- then just ignore the whole stylesheet, including our own declarations -- we add at start) -- - -- flags = 0x0001 to get the simplest/purest HTML without CSS, and dir= - -- and lang= attributes grabbed from parent nodes + -- flags = 0x1001 to get the simplest/purest HTML without CSS, with added + -- soft-hyphens where hyphenation is allowed (done by crengine according + -- to user's hyphenation settings), and dir= and lang= attributes grabbed + -- from parent nodes local html if extStartXP and extEndXP then - html = self.ui.document:getHTMLFromXPointers(extStartXP, extEndXP, 0x0001) + html = self.ui.document:getHTMLFromXPointers(extStartXP, extEndXP, 0x1001) else - html = self.ui.document:getHTMLFromXPointer(target_xpointer, 0x0001, true) + html = self.ui.document:getHTMLFromXPointer(target_xpointer, 0x1001, true) -- from_final_parent = true to get a possibly more complete footnote end if not html then diff --git a/frontend/apps/reader/modules/readertypeset.lua b/frontend/apps/reader/modules/readertypeset.lua index 0ab5fed18..507aedde0 100644 --- a/frontend/apps/reader/modules/readertypeset.lua +++ b/frontend/apps/reader/modules/readertypeset.lua @@ -342,11 +342,13 @@ end -- FLOAT_FLOATBOXES 0x00040000 x x -- DO_NOT_CLEAR_OWN_FLOATS 0x00100000 x x -- ALLOW_EXACT_FLOATS_FOOTPRINTS 0x00200000 x x +-- +-- BOX_INLINE_BLOCKS 0x01000000 x x x local BLOCK_RENDERING_FLAGS = { 0x00000000, -- legacy block rendering - 0x00030031, -- flat mode (with prepared floatBoxes, so inlined, to avoid display hash mismatch) - 0x00375131, -- book mode (floating floatBoxes, limited widths support) + 0x01030031, -- flat mode (with prepared floatBoxes, so inlined, to avoid display hash mismatch) + 0x01375131, -- book mode (floating floatBoxes, limited widths support) 0x7FFFFFFF, -- web mode, all features/flags }