Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Newline Characters in Table not handled correctly

Scott Bauer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 7, 2022

I am trying to create a table with one line, as it is to be imported via API to the comments of a test case.

 

Per documentation, it mentions using \\ as a newline character, but the issue is as follows:

||Header||\\|Cell1,1| gives this after render: 

Header

 

Cell1,1

So instead of formatting the line break as a newline, it is formatted as a cell containing a line break within. 

Can someone help me? The output I am hoping to achieve is 

 

Header

Cell 1,1

But it must be inputted as a one-line statement since it has to be in JSON format prior to the import - 

In other words, 

||Header||

|Cell1,1|

Can not be used. Any help would be appreciated, thank you

1 answer

0 votes
Stefan Salzl
Community Champion
November 7, 2022

Hi @Scott Bauer -- welcome the community,

there was a similar question like this some time a go. As far as I remember the solution was to use 

\n 

instead off

\\ 

as newLine character in your payload.

 

As far as I understood it correctly and my little API skills are sufficient I tried to update a description field of a bug in my system via API and the line break worked.

Hope this was helpful.

Best
Stefan

Suggest an answer

Log in or Sign up to answer