Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yaml-cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
yaml-cpp
Commits
2c2b7883
Commit
2c2b7883
authored
May 22, 2012
by
Jesse Beder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed doc start/end
parent
bc884061
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletions
+19
-1
src/emitter.cpp
+3
-1
src/emitterstate.cpp
+14
-0
src/emitterstate.h
+2
-0
No files found.
src/emitter.cpp
View file @
2c2b7883
...
@@ -181,6 +181,8 @@ namespace YAML
...
@@ -181,6 +181,8 @@ namespace YAML
if
(
m_stream
.
col
()
>
0
)
if
(
m_stream
.
col
()
>
0
)
m_stream
<<
"
\n
"
;
m_stream
<<
"
\n
"
;
m_stream
<<
"---
\n
"
;
m_stream
<<
"---
\n
"
;
m_pState
->
StartedDoc
();
}
}
// EmitEndDoc
// EmitEndDoc
...
@@ -313,7 +315,7 @@ namespace YAML
...
@@ -313,7 +315,7 @@ namespace YAML
void
Emitter
::
PrepareTopNode
(
EmitterNodeType
::
value
child
)
void
Emitter
::
PrepareTopNode
(
EmitterNodeType
::
value
child
)
{
{
if
(
m_pState
->
CurGroupChildCount
()
>
0
&&
m_stream
.
pos
()
>
0
)
{
if
(
m_pState
->
CurGroupChildCount
()
>
0
&&
m_stream
.
col
()
>
0
)
{
if
(
child
!=
EmitterNodeType
::
None
)
if
(
child
!=
EmitterNodeType
::
None
)
EmitBeginDoc
();
EmitBeginDoc
();
}
}
...
...
src/emitterstate.cpp
View file @
2c2b7883
...
@@ -111,6 +111,20 @@ namespace YAML
...
@@ -111,6 +111,20 @@ namespace YAML
return
EmitterNodeType
::
None
;
return
EmitterNodeType
::
None
;
}
}
void
EmitterState
::
StartedDoc
()
{
m_hasAnchor
=
false
;
m_hasTag
=
false
;
m_hasNonContent
=
false
;
}
void
EmitterState
::
EndedDoc
()
{
m_hasAnchor
=
false
;
m_hasTag
=
false
;
m_hasNonContent
=
false
;
}
void
EmitterState
::
StartedScalar
()
void
EmitterState
::
StartedScalar
()
{
{
StartedNode
();
StartedNode
();
...
...
src/emitterstate.h
View file @
2c2b7883
...
@@ -39,6 +39,8 @@ namespace YAML
...
@@ -39,6 +39,8 @@ namespace YAML
void
SetNonContent
();
void
SetNonContent
();
void
SetLongKey
();
void
SetLongKey
();
void
ForceFlow
();
void
ForceFlow
();
void
StartedDoc
();
void
EndedDoc
();
void
StartedScalar
();
void
StartedScalar
();
void
StartedGroup
(
GroupType
::
value
type
);
void
StartedGroup
(
GroupType
::
value
type
);
void
EndedGroup
(
GroupType
::
value
type
);
void
EndedGroup
(
GroupType
::
value
type
);
...
...
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