This fixes a bug found while working on another internal issue. This bug
is reproduced in the first commit which adds tests, clearly showing the
behavior of the incoherent rendering. The second commit makes the change
and updates the tests.
Fixes#17028
Fixes all outputs being printed adjacent without context, as seen in the
linked issue and the first commit:
```
--outputs:--
readme: "line 1\nline2\nline3\nline4"
--outputs:--
arn : "arn:aws:iam::616138583583:role/eks-role-24b1266"
assumeRolePolicy : (json) {
Statement: [
[0]: {
Action : "sts:AssumeRole"
Effect : "Allow"
Principal: {
Service: "eks.amazonaws.com"
}
Sid : ""
}
]
Version : "2008-10-17"
}
createDate : "2022-02-09T23:14:50Z"
id : "eks-role-24b1266"
inlinePolicies : [
[0]: {
name : ""
policy: ""
}
]
managedPolicyArns : [
[0]: "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy"
[1]: "arn:aws:iam::aws:policy/AmazonEKSServicePolicy"
]
uniqueId : "AROAY65FYVYPWXZQUXMBX"
--outputs:--
id : "eks-role-24b1266-20220209231452499500000001"
--outputs:--
id : "eks-role-24b1266-20220209231452597100000002"
--outputs:--
```