line break in table manually created with Markdown

Options
Kevin_579059
Kevin_579059 Posts: 67
edited June 2020 in Questions

Hello,

I am successfully creating my own tables on webforms and emails by following the tables generator website posted at:
https://community.pushbot.com/discussion/1082/create-your-own-markdown-table-webform-or-email-body

One question: I have one entry in one cell of a table that is rather lengthy, and I want to create a line break. Other sources
https://stackoverflow.com/questions/11700487/newline-in-markdown-table
state to use < br > to indicate the line break. The < br > (without spaces before and after the br) works on the practice site, but when I use that in Catalytic, no line break is created.

Is there a way to do a line break within a table created by Markdown, in Catalytic?

thanks!
Kevin

Answers

  • Brandon_189578
    Brandon_189578 Posts: 36
    edited June 2020
    Options

    @Kevin_579059 This is a bit of a technical reference, but https://spec.commonmark.org/0.29/#hard-line-breaks will also likely give you better guidance on how markdown will be rendered in the Catalytic platform. In your case, what you probably want is:

    line1  
    line2
    

    Note the two spaces after line1. That will convert into a hard line break in combination with the linebreak in the markdown itself.

    Also acceptable would be:

    line1
    
    line2
    

    However, that will start a new paragraph, which may give you more vertical blank space than desired. The double space approach above will allow you to add a break without necessarily starting a new "block".

    It looks like <br> is supported in the test renderer of the reference I linked as well, but that may be a non-standard extension. The double space approach appears to be closer to the standard, so that will likely work across a wider array of markdown renderers.

    Edited: after realizing the sample renderer I linked also renders <br> as a linebreak.
    Edit 2: After digging in to the different documentation sources a bit, I found this somewhat buried in the paragraph section: https://daringfireball.net/projects/markdown/syntax#p

    When you do want to insert a
    break tag using Markdown, you end a line with two or more spaces, then type return.

    Not necessarily the easiest thing to find, since it assumes you want to add a new line, but also know what a <br /> and a "break" is, as well as searching for those things instead of "new line".