Forum Discussion

cricketics's avatar
cricketics
Contributor
6 years ago

Code block markdown in description help required

Hello everyone, I am working first time with the markdown and wanted to see if you can help me. I am trying to put a simple json format example under description with using code block and followed the example but somehow, its giving me error.

 

I do have "|" on the first line like I read somewhere we must have to make it work

 

Here is what i have, please let me know where I am wrong and what I can fix and i would really appreciate it. 

 

 

 

  • kyleshockey's avatar
    kyleshockey
    6 years ago

    No problem! Glad you got it fixed.

     

    Here's a page with some helpful information about multiline strings in YAML: https://yaml-multiline.info

     

    Specifically, you might want to take a look at what the | character is doing for you behind the scenes, and consider using a block indentation indicator if you really want to change how indentation detection is happening.

  • kyleshockey's avatar
    kyleshockey
    SmartBear Alumni (Retired)

    Hi cricketics!

     

    You're seeing this because your `"message"` line is less indented than the first line of your string, which has the triple-backticks. YAML requires that you not go below the initial line's indentation level when writing a multiline string.

    • kyleshockey's avatar
      kyleshockey
      SmartBear Alumni (Retired)

      No problem! Glad you got it fixed.

       

      Here's a page with some helpful information about multiline strings in YAML: https://yaml-multiline.info

       

      Specifically, you might want to take a look at what the | character is doing for you behind the scenes, and consider using a block indentation indicator if you really want to change how indentation detection is happening.

      • cricketics's avatar
        cricketics
        Contributor

        Great, this is brilliant. I will look through that.

         

        Thanks

    • cricketics's avatar
      cricketics
      Contributor

      Kyle, this worked like a charm. Appreciate the help. I was able to fix it right away.

       

      Thank You.