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
faa2e506
Commit
faa2e506
authored
May 22, 2012
by
Jesse Beder
Browse files
Forced literal scalars to use long keys
parent
cdfbac1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/emitter.cpp
src/emitter.cpp
+5
-2
No files found.
src/emitter.cpp
View file @
faa2e506
...
@@ -536,11 +536,14 @@ namespace YAML
...
@@ -536,11 +536,14 @@ namespace YAML
if
(
!
good
())
if
(
!
good
())
return
*
this
;
return
*
this
;
PrepareNode
(
EmitterNodeType
::
Scalar
);
const
bool
escapeNonAscii
=
m_pState
->
GetOutputCharset
()
==
EscapeNonAscii
;
const
bool
escapeNonAscii
=
m_pState
->
GetOutputCharset
()
==
EscapeNonAscii
;
const
StringFormat
::
value
strFormat
=
Utils
::
ComputeStringFormat
(
str
,
m_pState
->
GetStringFormat
(),
m_pState
->
CurGroupFlowType
(),
escapeNonAscii
);
const
StringFormat
::
value
strFormat
=
Utils
::
ComputeStringFormat
(
str
,
m_pState
->
GetStringFormat
(),
m_pState
->
CurGroupFlowType
(),
escapeNonAscii
);
if
(
strFormat
==
StringFormat
::
Literal
)
m_pState
->
SetMapKeyFormat
(
YAML
::
LongKey
,
FmtScope
::
Local
);
PrepareNode
(
EmitterNodeType
::
Scalar
);
switch
(
strFormat
)
{
switch
(
strFormat
)
{
case
StringFormat
::
Plain
:
case
StringFormat
::
Plain
:
m_stream
<<
str
;
m_stream
<<
str
;
...
...
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