aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ext_depends/D-YAML/source/dyaml/representer.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext_depends/D-YAML/source/dyaml/representer.d')
-rw-r--r--src/ext_depends/D-YAML/source/dyaml/representer.d8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ext_depends/D-YAML/source/dyaml/representer.d b/src/ext_depends/D-YAML/source/dyaml/representer.d
index 98c825b..f903b60 100644
--- a/src/ext_depends/D-YAML/source/dyaml/representer.d
+++ b/src/ext_depends/D-YAML/source/dyaml/representer.d
@@ -91,7 +91,9 @@ Node representData(const Node data, ScalarStyle defaultScalarStyle, CollectionSt
{
result.collectionStyle = defaultCollectionStyle;
}
+ break;
case NodeID.invalid:
+ break;
}
@@ -123,7 +125,7 @@ Node representData(const Node data, ScalarStyle defaultScalarStyle, CollectionSt
@safe unittest
{
- assert(representData(Node(cast(string)null), ScalarStyle.invalid, CollectionStyle.invalid) == Node("null", "tag:yaml.org,2002:null"));
+ assert(representData(Node(cast(string)null), ScalarStyle.invalid, CollectionStyle.invalid) == Node("", "tag:yaml.org,2002:str"));
assert(representData(Node("Hello world!"), ScalarStyle.invalid, CollectionStyle.invalid) == Node("Hello world!", "tag:yaml.org,2002:str"));
}
@@ -289,9 +291,7 @@ Node representNull() @safe
Node representString(const Node node) @safe
{
string value = node.as!string;
- return value is null
- ? Node("null", "tag:yaml.org,2002:null")
- : Node(value, "tag:yaml.org,2002:str");
+ return Node(value, "tag:yaml.org,2002:str");
}
//Represent a bytes _node as a binary scalar.