Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Behind the Scenes
  3. Qt.io webservices
  4. Line breaks in code blocks?
Forum Updated to NodeBB v4.3 + New Features

Line breaks in code blocks?

Scheduled Pinned Locked Moved Qt.io webservices
3 Posts 2 Posters 1.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Asperamanca
    wrote on last edited by
    #1

    How do I do line breaks in code blocks?
    I surround the following block with that strange ' sign:
    int x;
    int y;
    x=0;\n
    y=0;<p>
    return x+y;

    Here is what comes out:

    int x; int y; x=0;\n y=0;<p> return x+y;

    And yes, I have read the help
    It just doesn't help because it doesn't seem to have anything to do with how things work in this forum.

    p3c0P 1 Reply Last reply
    0
    • A Asperamanca

      How do I do line breaks in code blocks?
      I surround the following block with that strange ' sign:
      int x;
      int y;
      x=0;\n
      y=0;<p>
      return x+y;

      Here is what comes out:

      int x; int y; x=0;\n y=0;<p> return x+y;

      And yes, I have read the help
      It just doesn't help because it doesn't seem to have anything to do with how things work in this forum.

      p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      @Asperamanca Use ``` (3 backticks) for code blocks and single backtick is meant to make it format in special monospace format. Putting it in 3 backticks will make it appear properly:

      int x;
      int y;
      x=0;\n
      y=0;<p>
      return x+y;
      

      Also there is list of most frequently used tags at the bottom of page when you edit or post.

      157

      1 Reply Last reply
      1
      • A Offline
        A Offline
        Asperamanca
        wrote on last edited by
        #3

        Thank you. The three backtick thing doesn't seem to be documented in the help I linked above.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved