• oktoberpaard@feddit.nl
    link
    fedilink
    arrow-up
    0
    ·
    9 months ago

    It’s Markdown syntax. You can actually format it nicely in a code block:

    bool isEven( long long x ) {
      if ( x < 0 ) x = -x;
      if ( x == 1 )
        return false;
      if ( x == 2 )
        return true;
      return isEven( x - 2 );
    }
    

    You do that by adding ``` above and below it. To force single line breaks, you can terminate your sentences with two spaces, or a backslash.

    • Buddahriffic@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      9 months ago

      Ah thank you, the editor in connect isn’t great and doesn’t have the markdown guide or buttons for the preformatted block, so I couldn’t find the character combo to use it (and never would have guessed that lol). Also it keeps giving an error when I edit, though the edit is going through.