Multiline Variables in Manual Intervention Instructions


We’re experiencing an issue very similar to this one:

I can recreate the issue with a simple output variable assigned to a 2 line string such as:

$result = @'
line 1
line 2

Write-Output $result

Set-OctopusVariable -name "Result" -value "$result"

this displays in the instructions as:

line 1 line 2

The Task Log shows the same variable output correctly on 2 lines from the powershell script.

We’re using version 2018.5.7.

Hi Dave,

The manual intervention instructions use markdown syntax and to insert a new line, you need to add a blank line between each line. I.e.

$result = @"


I hope that helps.

Thank you and kind regards,


I’m familiar with Markdown, however typically MarkDown renders single line breaks as a new line, and double as a new paragraph. This would be really useful to support. I’m not actually in control of the formatting of the content as it is the output from a process run by a PowerShell script.

For now I’m wrapping the variable with 3 backticks so it gets formatted as code and this works well.

Thanks for your help,

Hi Dave,

Good to hear that you’ve got a workaround for the issue, I’ll investigate why we’re not properly rendering single new lines.


Thanks Henrik.

I’ve just done a bit more reading - I think there is some variance between different MarkDown parsers, some requiring a double space at the end of the preceding line in order to treat as a line break. Unfortunately the MarkDown Documentation linked to from the Octopus UI doesn’t cover this.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.