Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
d0250400
"...composable_kernel_rocm.git" did not exist on "dd0188b385f9fefd8cd51884d78dec8e5af8fd8f"
Commit
d0250400
authored
Dec 02, 2016
by
butataatawa
Committed by
Jesse Beder
Dec 02, 2016
Browse files
Fix input strings with quotes giving "!" tagging artifacts.
parent
1f4b6d5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
src/emitfromevents.cpp
src/emitfromevents.cpp
+1
-1
test/integration/emitter_test.cpp
test/integration/emitter_test.cpp
+6
-0
No files found.
src/emitfromevents.cpp
View file @
d0250400
...
@@ -111,7 +111,7 @@ void EmitFromEvents::BeginNode() {
...
@@ -111,7 +111,7 @@ void EmitFromEvents::BeginNode() {
}
}
void
EmitFromEvents
::
EmitProps
(
const
std
::
string
&
tag
,
anchor_t
anchor
)
{
void
EmitFromEvents
::
EmitProps
(
const
std
::
string
&
tag
,
anchor_t
anchor
)
{
if
(
!
tag
.
empty
()
&&
tag
!=
"?"
)
if
(
!
tag
.
empty
()
&&
tag
!=
"?"
&&
tag
!=
"!"
)
m_emitter
<<
VerbatimTag
(
tag
);
m_emitter
<<
VerbatimTag
(
tag
);
if
(
anchor
)
if
(
anchor
)
m_emitter
<<
Anchor
(
ToString
(
anchor
));
m_emitter
<<
Anchor
(
ToString
(
anchor
));
...
...
test/integration/emitter_test.cpp
View file @
d0250400
...
@@ -46,6 +46,12 @@ TEST_F(EmitterTest, SimpleScalar) {
...
@@ -46,6 +46,12 @@ TEST_F(EmitterTest, SimpleScalar) {
ExpectEmit
(
"Hello, World!"
);
ExpectEmit
(
"Hello, World!"
);
}
}
TEST_F
(
EmitterTest
,
SimpleQuotedScalar
)
{
Node
n
(
Load
(
"
\"
test
\"
"
));
out
<<
n
;
ExpectEmit
(
"test"
);
}
TEST_F
(
EmitterTest
,
SimpleSeq
)
{
TEST_F
(
EmitterTest
,
SimpleSeq
)
{
out
<<
BeginSeq
;
out
<<
BeginSeq
;
out
<<
"eggs"
;
out
<<
"eggs"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment