Hacker News new | past | comments | ask | show | jobs | submit login

For the life of me, I cannot figure out how to create two adjacent but separate code blocks.

    ```
    one
    ```
    ```
    two
    ```
I've tried and tried.



The flow of pasting such strings is not great either. Previously you could paste a string with backticks and it would be formatted correctly on send.

Now the behaviour is to ask you every time to apply formatting. There is an option for "don't ask again" which I tried assuming it would make autoformatting the default, but it turns off the behaviour completely with no way to get it back!


`CMD + Shift + F` applies formatting.

Unfortunately it must be done every time, no autoformatting by default it seems.


If you add a blank line between them, then it won't combine them.


I didn't really want an extra blank line between them.

Still...I could have swore I had tried that anyway. Huh.


You can exit a code block by hitting Command Option Shift C. I found this out by hovering over the code block icon in the bar below the editor box.

The trick seems to be to add a blank final line, otherwise, it will not include the last line you typed in a code block.


So in other words: you still need to be "tech savvy" to do this...


Only if you care about that level of specificity of the results; and given that non-technical people love pasting code snippets into slack without the code fences, I'm guessing this change isn't even wanted by non-technical people, and only made detail-oriented folks upset


You don't need the key combo, just as you said, you just need another line, with text or a blank line. I guess before now you could but them right back-to-back? This has never been my use case, but if it was, I can see how this is annoying.


I'm fairly sure you also used to be able to put bullets in blockquotes, right?

e.g.

  > * My quoted bullet point
I can't double-check it now as all my workspaces have converted


Typing option-return between the two blocks works for me.


insert newlines until your eyes bleed




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: