Sometime in the last couple of months, Discourse has started adding carriage returns between bullet list entries when I paste markdown into a new post window.
For example, when I copy a simple list from my text editor:
I have confirmed this happenswhen I paste into this discourse, even, right here, in this text input box, like so:
foo
bar
baz
Incidentally, when I pasted above into a ``` section I had already started at the top for the example text, it pasted properly (but of course didn’t get formatted into bullet points).
Oh, I just thought of something. Wonder if it does it for numbered lists too?
foo
bar
baz
…yup.
And I just tried 3 lines of just text, and it appears to do the same, it’s adding carriage returns to everything:
I’ve tried changing this setting and it seems to have no effect on pasting adding extra linebreaks to the resulting input.
I did find the “enable rich text paste” option while looking for that, and I can confirm that turning it off fixes things. So it appears that enabling that mangles markdown even though it should presumably only be doing HTML?
The first thing that popped in my head: are you sure it isn’t HTML? As in, when it’s copied to your buffer from wherever, is it still markdown, or did it convert markdown into HTML, and then is trying to reverse it back.
Just a random thought, probably a bug. But there are so many IDE and text editors that are essentially browser windows…
It’s VSCode with the Markdown All In One plugin enabled (on Mac). It worked up until a few months ago, I presume something changed in the code or the discourse instance, but I couldn’t tell you when exactly. VSCode has certainly updated a billion times since then, too. As far as I can tell when I copy it, it’s just “regular” text. Not sure how to debug that though…