Closed nathanlesage closed 4 years ago
@nathanlesage, this issue should be fixed in this commit 6a8299c2d787d9e5fe22882b845143e59685e1aa and indeed the problem was that the code was incorrectly assuming that a font family would be defined. So upgrading to joplin-turndown@4.0.29 should fix the issue.
@laurent22 Thank you very much for your work on this! Will do! :)
I'm referring to the following issue that has been opened on the Zettlr issue tracker: https://github.com/Zettlr/Zettlr/issues/693
Apparently, there is a case where Turndown fails to turn down HTML with a
console.error
if you copy plain text from within Safari or Google Chrome and attempt to feed the produced HTML content from the clipboard to Turndown:This error is exactly the same for both Google Chrome (current version) and Safari (current version).
Reproducing
Open any code file (that is, not an HTML file) in Safari or Chrome, copy everything into the clipboard, and feed that generated HTML into Turndown. Tested with this one: https://necolas.github.io/normalize.css/latest/normalize.css
Firefox does not expose that behaviour. However, the
pre
-tag is also not correctly parsed, as the text is treated literal (that is: stars in the example of normalize.css are escaped and the whole thing is not encapsulated with backticks)Firefox clipboard
Chrome clipboard
Safari clipboard
I believe it's because the previous checks in said function pass, but the
find
-function does not work:Thank you very much for this awesome library, it made working with Zettlr a thousand times better :) If you need any more additional information from me, please don't hesitate to ask, and I'll see to provide it quickly!
All the best!