mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
c909952238
commit
fa19925f86
@ -88,6 +88,8 @@ def copy_all(text_browser):
|
|||||||
from calibre.utils.html2text import html2text
|
from calibre.utils.html2text import html2text
|
||||||
simplified_html = etree.tostring(root, encoding='unicode')
|
simplified_html = etree.tostring(root, encoding='unicode')
|
||||||
txt = html2text(simplified_html, single_line_break=True).strip()
|
txt = html2text(simplified_html, single_line_break=True).strip()
|
||||||
|
if iswindows:
|
||||||
|
txt = '\r\n'.join(txt.splitlines())
|
||||||
# print(simplified_html)
|
# print(simplified_html)
|
||||||
# print(txt)
|
# print(txt)
|
||||||
md.setText(txt)
|
md.setText(txt)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user