Skip to main content
6 events
when toggle format what by license comment
Jul 17, 2022 at 15:35 history edited Yaakov EllisStaffMod CC BY-SA 4.0
Declined
Jul 14, 2022 at 13:19 comment added Yaakov Ellis StaffMod I hear you. Spaces in RT should just be spaces. But then round-tripping leads to the obvious: "what do we do with these 4 leading spaces now" issue, which could end up being a wont-fix, since the fix isn't really obvious or intuitive. And switching them into non-breaking spaces is also not so great, since that is also changing their input.
Jul 14, 2022 at 13:17 comment added Ryan M I think it comes down to a philosophy question of whether you want the user to understand that they're editing Markdown (so 4 spaces = code block) or if it's just a normal rich-text editor that happens to serialize to Markdown (so 4 spaces = 4 spaces, and you should try to preserve what the user typed, such as with non-breaking spaces). Of course, the latter approach then raises the question of what to do if the user types multiple spaces elsewhere in a line. I think I personally lean slightly toward "spaces in a rich-text editor are just spaces", but reasonable minds may disagree.
Jul 14, 2022 at 13:16 comment added Ryan M @YaakovEllis That certainly solves the problem, but I'm not sure it's a useful feature in its own right (other than not having to remember the shortcut for a code block). It may also introduce other problems. If a user isn't expecting it, they'd probably try to backspace to undo whatever they just did. It's maybe also worth considering what would happen if you did it to the line after a code block - should it add it to the code block or just make a new one? Should that depend on whether the code block is fenced or indented?
Jul 14, 2022 at 11:46 comment added Yaakov Ellis StaffMod I am thinking that once you add 4 leading space, it should automatically become a code-block. Thoughts?
Jul 13, 2022 at 10:37 history answered Ryan M CC BY-SA 4.0