[LH3875] [RC1] Copy As Markdown still adds extra line spaces.

Just thought I’d throw this one back out there as we’re getting closer to release and we’re looking at Release Candidate updates now – apologies if this is still being worked on, but I couldn’t see mention of it in any of the update notes.

Using the ‘copy as Markdown’ function adds extra line spaces between paragraphs. I’ve tried pasting into a couple of different markdown editors, and into Windows Notepad, and also back into Scrivener itself, all with the same result.

During this operation Rich Text is converted to MMD, which indeed is expected to have extra empty lines between paragraphs. Scrivener for Mac and Windows produce identical results here.

Ahh, thanks for clarifying!

In that case – and just out of curiosity – is there any intention of including a feature like the one in Windows 1.x, wherein you can simply convert the text formatting (bold, italics, etc) to Markdown and then just copy-paste the text as normal? Assuming such a function doesn’t exist already, just somewhere other than where I’ve been looking – it’s been known to happen!

Compile to Multi-Markdown, maybe?

I tried this, and can’t find a way to preserve both text and paragraph formatting.

I don’t use compile often, so may be missing something obvious, but compiling directly to MMD preserves the paragraph formatting but loses all other text formatting (bold, italic, etc), while checking the ‘convert rich text to MMD’ box preserves the text formatting but adds the extra line breaks. I can’t seem to find a way of converting bold/italics/etc only while preserving everything else, as with Scrivener 1.x’s ‘convert bold/italics to MMD’.

Again, it’s entirely possible that my unfamiliarity with compiling means I’m doing something stupid here – apologies if so!

To clarify, the intention for this copy command is to serve how you wish to use it. It does convert more than just bold and italics, but unless you actually use Markdown to write, how it works shouldn’t get in your way (and should generally be desirable, like having lists and links converted). The excessive line padding is not how it is meant to work though. It should only add padding if it necessary to do so.

So, just to check, that would make the extra spacing a bug, rather than expected behaviour? (Apologies for my own lack of comprehension, here – the above post mentioning identical behaviour between Mac and Windows Scrivener has me a little confused as to whether this is considered normal or buggy.)

If it helps to elucidate, a little searching through my own forum history brings up this thread which has the issue filed as such, with an appropriate ticket number and a more helpful user than myself providing screencaps – [LH3440] Copy Special > MMD & BBCode multiplies and adds extra paragraphs between copy/pasted text - #4 by Collider – The problem seems to originate around Beta 15, but I haven’t seen any mention of it since, either in fixed or known issues, so thought it might help to flag it back up now we’re nearing release.

Again, many apologies if I’m being difficult – it’s not intentional!

I don’t know if I’d classify it as a bug—it was working precisely as it was programmed to work. As I say though (and did in the previously linked thread), that is not how it is intended to work, in a design sense—whether you call it “excessive line padding” or “extra spacing”, it is not correct in the build you have.

I’m not sure what else you’re asking for clarification on, sorry. :slight_smile:

I think what’s tripping me up is that it is working the way it’s programmed to, but also not working the way it was intended to. I can’t quite make out whether that means it’s a flaw in the way I’m using the function myself, and thus something I need to work around, or something in the design that will be changed/fixed in a future build.

Again, apologies for the slowness in understanding.

The syntax of the MultiMarkdown requires a blank line at the end of the paragraph.

Yeah maybe that’s the point of confusion. I’m coming at this from the assumption that this is known. If we don’t add an empty line between paragraphs then it is not useful Markdown, it will be one 800 word paragraph or whatever. What was broken is that it was adding lines on top of empty lines. So if your text was already double-spaced then it would end up quadruple-spaced. There are around a dozen other contingencies and edge cases beyond that simple declaration, so it’s more complicated than just that, but if you mean extra line spaces as in: one only needs a single empty line but gets more, then that will be fixed. If you consider an empty line to be “extra” then that’s not Markdown and that isn’t what this command will be generating.

Thanks all, for the clarification!

That’s what I was getting at, yep – paragraphs are double-spaced but become quadruple-spaced on copy-paste, which was behaviour I hadn’t noticed prior to Beta 15. Apologies again for not being clearer in my original post(s), and thanks again for your clarifications (and patience)!