Line breaks in code block

I realized that in a code block, if you press ENTER or SHIFT + ENTER, it leaves the code block straight away. However, it’s pretty common to have more than one lines in a code block. My question is:

  1. Should ENTER or SHIFT + ENTER by default create a newline in a code block?
  2. If not, what’s the best way to create a newline in a code block?


Yes, this needs work, but it’s not entirely clear what a good set of behavior would be. See also this issue. (The good news is that you can work around most of these by customizing your editor. If you come up with something coherent, please comment on the issue I linked.)