Email composing: `code` appends a space

When I use backticks to format a string as code (to use fixed width font), Mailspring does format the string as expected, but it appends a space after it. I think this is because you wanted to address the fact that when the space is not there (either not appended or removed by Backspace), the following characters will be also formatted as code.

Now I think that Mailspring (1) should not append that space (or insert anything else) and (2) the character that following the string formatted as code, should be in the format used just before code format (e.g. font: Sans Serif; font size: Normal).

I think a connected issue is the codeblock (using triple backticks): when I insert triple backticks at the beginning of a line, that line is formatted as codeblock (as expected). But when I paste in that line a multiline text copied from somewhere else, it create separate codeblocks for each and every line. Should be: one codeblock for the whole pasted text.


(Originally posted by tukusejssirs on GitHub.)

Hey! Thanks for reporting this @tukusejssirs, you’re definitely right about why this happens :slight_smile: We made it append a space after the closing tick mark so that subsequent characters weren’t joined into the code block. I think you’re totally right that it should go back to the format that you were using previous to opening the code block.

I’ll see if we can fix this - I think that originally this was done to workaround a bug in the text editor, but that may be fixed now!


(Originally posted by bengotow on GitHub.)

Thanks! Hope you find a fix for both (sub)issues. Both are bugging me equally, although I use the inline code formatting much more frequently.


(Originally posted by tukusejssirs on GitHub.)