Fix input strings with quotes giving "!" tagging artifacts.
This commit is contained in:
parent
1f4b6d5c85
commit
d025040049
@ -111,7 +111,7 @@ void EmitFromEvents::BeginNode() {
|
||||
}
|
||||
|
||||
void EmitFromEvents::EmitProps(const std::string& tag, anchor_t anchor) {
|
||||
if (!tag.empty() && tag != "?")
|
||||
if (!tag.empty() && tag != "?" && tag != "!")
|
||||
m_emitter << VerbatimTag(tag);
|
||||
if (anchor)
|
||||
m_emitter << Anchor(ToString(anchor));
|
||||
|
@ -46,6 +46,12 @@ TEST_F(EmitterTest, SimpleScalar) {
|
||||
ExpectEmit("Hello, World!");
|
||||
}
|
||||
|
||||
TEST_F(EmitterTest, SimpleQuotedScalar) {
|
||||
Node n(Load("\"test\""));
|
||||
out << n;
|
||||
ExpectEmit("test");
|
||||
}
|
||||
|
||||
TEST_F(EmitterTest, SimpleSeq) {
|
||||
out << BeginSeq;
|
||||
out << "eggs";
|
||||
|
Loading…
Reference in New Issue
Block a user