Fixed newline handling in encoder/decoder

This commit is contained in:
Mike Farah
2021-10-22 15:21:01 +11:00
parent a1af1b95d0
commit 587af7f722
3 changed files with 16 additions and 3 deletions
+2
View File
@@ -1,5 +1,6 @@
Encode operators will take the piped in object structure and encode it as a string in the desired format. The decode operators do the opposite, they take a formatted string and decode it into the relevant object structure.
These operators are useful to process yaml documents that have stringified embeded yaml/json/props in them.
## Encode value as yaml string
Given a sample.yml file of:
```yaml
@@ -98,6 +99,7 @@ Given a sample.yml file of:
a: |
foo: bar
baz: dog
```
then
```bash