toYamlString function
Serializes node into a String and returns it.
Implementation
String toYamlString(node, {bool? sort}) {
var sb = StringBuffer();
_sort = sort ?? false;
writeYamlString(node, sb);
/// moves text to be inline with [hyphen '-']
return sb.toString().replaceAll(RegExp(r'-\s\n\s*'), '- ');
}