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
21232e3b
"examples/community/pipeline_zero1to3.py" did not exist on "c5594795929c9c0274ae4a72cbffb2e03d128efe"
Commit
21232e3b
authored
Sep 07, 2009
by
jbeder
Browse files
Fixed bug in trailing newlines of plain scalars
parent
90be7e75
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/scanscalar.cpp
src/scanscalar.cpp
+3
-3
src/scantoken.cpp
src/scantoken.cpp
+1
-1
No files found.
src/scanscalar.cpp
View file @
21232e3b
...
@@ -141,11 +141,11 @@ namespace YAML
...
@@ -141,11 +141,11 @@ namespace YAML
scalar
.
erase
(
pos
+
1
);
scalar
.
erase
(
pos
+
1
);
}
}
if
(
params
.
chomp
<
=
0
)
{
if
(
params
.
chomp
=
=
STRIP
||
params
.
chomp
==
CLIP
)
{
std
::
size_t
pos
=
scalar
.
find_last_not_of
(
'\n'
);
std
::
size_t
pos
=
scalar
.
find_last_not_of
(
'\n'
);
if
(
params
.
chomp
==
0
&&
pos
+
1
<
scalar
.
size
())
if
(
params
.
chomp
==
CLIP
&&
pos
+
1
<
scalar
.
size
())
scalar
.
erase
(
pos
+
2
);
scalar
.
erase
(
pos
+
2
);
else
if
(
params
.
chomp
==
-
1
&&
pos
<
scalar
.
size
())
else
if
(
params
.
chomp
==
STRIP
&&
pos
<
scalar
.
size
())
scalar
.
erase
(
pos
+
1
);
scalar
.
erase
(
pos
+
1
);
}
}
...
...
src/scantoken.cpp
View file @
21232e3b
...
@@ -290,7 +290,7 @@ namespace YAML
...
@@ -290,7 +290,7 @@ namespace YAML
params
.
fold
=
true
;
params
.
fold
=
true
;
params
.
eatLeadingWhitespace
=
true
;
params
.
eatLeadingWhitespace
=
true
;
params
.
trimTrailingSpaces
=
true
;
params
.
trimTrailingSpaces
=
true
;
params
.
chomp
=
CL
IP
;
params
.
chomp
=
STR
IP
;
params
.
onDocIndicator
=
BREAK
;
params
.
onDocIndicator
=
BREAK
;
params
.
onTabInIndentation
=
THROW
;
params
.
onTabInIndentation
=
THROW
;
...
...
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