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
b0dd0f86
Commit
b0dd0f86
authored
May 21, 2012
by
Jesse Beder
Browse files
Fixed anchor/tag in seq > map
parent
3cae26a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
src/emitter.cpp
src/emitter.cpp
+2
-0
util/sandbox.cpp
util/sandbox.cpp
+5
-2
No files found.
src/emitter.cpp
View file @
b0dd0f86
...
@@ -337,6 +337,8 @@ namespace YAML
...
@@ -337,6 +337,8 @@ namespace YAML
m_stream
<<
"
\n
"
;
m_stream
<<
"
\n
"
;
break
;
break
;
case
EmitterNodeType
::
BlockMap
:
case
EmitterNodeType
::
BlockMap
:
if
(
m_pState
->
HasBegunNode
())
m_stream
<<
"
\n
"
;
break
;
break
;
}
}
}
}
...
...
util/sandbox.cpp
View file @
b0dd0f86
...
@@ -4,13 +4,16 @@
...
@@ -4,13 +4,16 @@
int
main
()
int
main
()
{
{
YAML
::
Emitter
out
;
YAML
::
Emitter
out
;
out
<<
YAML
::
Anchor
(
"monkey"
);
out
<<
YAML
::
Anchor
(
"monkey"
)
<<
YAML
::
LocalTag
(
"a"
)
;
out
<<
YAML
::
BeginSeq
;
out
<<
YAML
::
BeginSeq
;
out
<<
"foo"
;
out
<<
"foo"
;
out
<<
YAML
::
LocalTag
(
"hi"
)
<<
"bar"
;
out
<<
YAML
::
LocalTag
(
"hi"
)
<<
"bar"
;
out
<<
YAML
::
BeginMap
;
out
<<
YAML
::
Anchor
(
"asdf"
)
<<
YAML
::
BeginMap
;
out
<<
"a"
<<
"b"
<<
"c"
<<
"d"
;
out
<<
"a"
<<
"b"
<<
"c"
<<
"d"
;
out
<<
YAML
::
EndMap
;
out
<<
YAML
::
EndMap
;
out
<<
YAML
::
LocalTag
(
"hi"
)
<<
YAML
::
BeginSeq
;
out
<<
"a"
<<
"b"
;
out
<<
YAML
::
EndSeq
;
out
<<
YAML
::
EndSeq
;
out
<<
YAML
::
EndSeq
;
std
::
cout
<<
out
.
c_str
()
<<
"
\n
"
;
std
::
cout
<<
out
.
c_str
()
<<
"
\n
"
;
...
...
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