Ensure annotations span styles override all others

This commit is contained in:
Kovid Goyal 2020-07-06 13:55:49 +05:30
parent 6834028e6a
commit 05eb665be9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -113,6 +113,9 @@ def wrap_text_in_range(style, r, process_wrapper):
wrapper_elem = document.createElement('span') wrapper_elem = document.createElement('span')
wrapper_elem.dataset.calibreRangeWrapper = v'++wrapper_counter' + '' wrapper_elem.dataset.calibreRangeWrapper = v'++wrapper_counter' + ''
if style: if style:
if !style.endsWith(';'):
style += ';'
style = str.replace(style, ';', ' !important;')
wrapper_elem.setAttribute('style', style) wrapper_elem.setAttribute('style', style)
intersecting_wrappers = {} intersecting_wrappers = {}