Paragraph breaks being eaten in Markdown to EPUB conversion
I've got a collection of books in Markdown format, which is a good choice for them, there being little need for formatting in these books: chapter heads, maybe a little boldface and italic markup, maybe a horizontal rule to break up a second...that's enough.
However, I'd also like to have EPUB versions of these because that adds a few features I want such as remembering the last-read position, binding the author name into the book, etc.
The problem is that I end up with a wall-of-text no matter how I format the source Markdown files or what adjustments I make to the various paragraph styling options in the dialog Calibre presents when you click it Convert Books button.
I won't claim to have exhaustively tested all possible combinations, but I've got to be up to about 20 combinations so far. No matter what, all the paragraphs get run together until the next header break, horizontal rule, etc.
Is this a bug, or is there some secret to getting proper paragraph breaks?
In case it matters, my ideal Markdown flavor is UTF-8, LF-only line endings, and no hard line breaks in the source text. That is, each paragraph is on a single line, soft-wrapped to the window width in my Markdown editor, with at least two LFs separating each paragraph. (Sometimes I put in extra vertical space between major sections.)
I want the resulting EPUB to show a blank line between paragraphs, with no first-line indent, so that it looks approximately like the source Markdown.
You can correctly infer from my double LFs that I'm working on a POSIX type platform, macOS 10.14, specifically.
These Markdown files render just fine in all the other Markdown renderers I've tried, so I'm confident that they're well-formed. I've even run them through "od -c" to make sure there aren't some odd hidden characters causing problems, but no, they're pretty much plain ASCII with the occasional UTF-8 character. (em dashes and curly quotes, mainly.) I've got the text input option set to utf-8 in the Calibre conversion dialog.
I've also gone through these files to strip trailing spaces from lines, except in those rare cases where I put in 2 spaces at the end to force a soft line break.
I've tried hard-wrapping these paragraphs to 72 columns, but that doesn't help, and I don't want to format these docs that way anyway.
After fighting with Calibre conversion settings, I've gone and reset all the settings to the defaults to make sure it isn't some kind of configuration error on my part, and it still gives me wall-fo-text EPUB output.
|