Closed nuttyartist closed 1 year ago
Hello, thank you for planning to use/using this library. It really makes me happy if someone uses the things I prigrammed in my free time!
And without really looking into it (because I'm not at rome right now), I think it is because it inserts a line break every 80-100 characters. It can be disabled by setting html2md::Options.splitLines
to false (it's true by default)
Awesome! It works now. And yes, your library will be very useful.
I do need to convert my QString to stdString and back again to QString. Is there a way to avoid doing that?
Awesome! It works now. And yes, your library will be very useful.
Thanks, I'm glad to hear that it works :+1:
I do need to convert my QString to stdString and back again to QString. Is there a way to avoid doing that?
No, unfortunately not. At least not now. I'll see if we can avoid it by using templates. That's something that annoyed me too.
Alrighty, thanks a lot! I'm closing this.
Hey Tim!
Thanks for this library. I'm planning to use this in my block-editor (https://github.com/nuttyartist/notes/tree/block-editor) when a user paste HTML content into the editor, I want to convert it to Markdown.
But I'm encountering a problem, the same one I encountered with
QTextDocument::toMarkdown
(after doingsetHTML
). For some reason both insert line breaks (\n
) unnecessarily. For example I took the following random text from the internet (https://news.ycombinator.com/item?id=38108048).m_clipboard->mimeData(QClipboard::Clipboard)->html()
returns:Using
html2md
:While it should return:
What can be done about this? (QTextMarkdown shares the same problem).