YAML provides 9 ways to handle strings (#tilPost)

I use YAML sparingly, but occasionally I have to fiddle with GitHub actions that use it as their configuration format. After defining some CI/CD commands, I started looking into multi-line strings, and oh boy…
Multiline strings ar…


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis

I use YAML sparingly, but occasionally I have to fiddle with GitHub actions that use it as their configuration format. After defining some CI/CD commands, I started looking into multi-line strings, and oh boy...

Multiline strings are annoying in any configuration format, but YAML reaches another level. There are nine (!) different ways to handle strings: , ', ", |, |+, |-, >, >+ and >-. Nine! 🤯

Check the YAML Playground or this StackOverflow answer. Big kudos to the person taking the time to write a novel describing string handling. 🙇‍♂️


Reply to Stefan


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis


Print Share Comment Cite Upload Translate Updates
APA

Stefan Judis | Sciencx (2023-03-07T23:00:00+00:00) YAML provides 9 ways to handle strings (#tilPost). Retrieved from https://www.scien.cx/2023/03/07/yaml-provides-9-ways-to-handle-strings-tilpost/

MLA
" » YAML provides 9 ways to handle strings (#tilPost)." Stefan Judis | Sciencx - Tuesday March 7, 2023, https://www.scien.cx/2023/03/07/yaml-provides-9-ways-to-handle-strings-tilpost/
HARVARD
Stefan Judis | Sciencx Tuesday March 7, 2023 » YAML provides 9 ways to handle strings (#tilPost)., viewed ,<https://www.scien.cx/2023/03/07/yaml-provides-9-ways-to-handle-strings-tilpost/>
VANCOUVER
Stefan Judis | Sciencx - » YAML provides 9 ways to handle strings (#tilPost). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/03/07/yaml-provides-9-ways-to-handle-strings-tilpost/
CHICAGO
" » YAML provides 9 ways to handle strings (#tilPost)." Stefan Judis | Sciencx - Accessed . https://www.scien.cx/2023/03/07/yaml-provides-9-ways-to-handle-strings-tilpost/
IEEE
" » YAML provides 9 ways to handle strings (#tilPost)." Stefan Judis | Sciencx [Online]. Available: https://www.scien.cx/2023/03/07/yaml-provides-9-ways-to-handle-strings-tilpost/. [Accessed: ]
rf:citation
» YAML provides 9 ways to handle strings (#tilPost) | Stefan Judis | Sciencx | https://www.scien.cx/2023/03/07/yaml-provides-9-ways-to-handle-strings-tilpost/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.