Fix a regression in the previous release that caused copying book details to clipboard to use unix line endings on windows

This commit is contained in:
Kovid Goyal 2022-11-04 11:05:27 +05:30
parent c909952238
commit fa19925f86
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -88,6 +88,8 @@ def copy_all(text_browser):
from calibre.utils.html2text import html2text
simplified_html = etree.tostring(root, encoding='unicode')
txt = html2text(simplified_html, single_line_break=True).strip()
if iswindows:
txt = '\r\n'.join(txt.splitlines())
# print(simplified_html)
# print(txt)
md.setText(txt)