Send a new line in a comment to Conduit API



Conduit API allow to send a new comment to a Phabricator review with
by sending the comment as a string.

How do I represent a new line in the message string?


I tried "\n", "\\n", "<br>" and "<\br>"

Nothing worked. They all appear like that in the output.

Wrongly closed question
Send a new line in a comment to Conduit API from Jenkins

In JSON strings, newlines are represented as \n.


I tried that (just edited the original question). Is there an easy was to test that in Conduit? (maybe some other thing in the pipeline is messing with it.


What command(s) are you actually using to make the api call?

curl -d api.token="super-secret" -d revision_id=<id> -d message="No\nNo\\nNo\\\nNo\\\\nNo<br>No<\br>No"




That’s not json, that’s shell.

In shell, new lines are just newlines:

curl -d message='foo


Ah! Obviously…
Missed that!