summaryrefslogtreecommitdiff
path: root/ext/syck/emitter.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-02 23:15:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-02 23:15:08 +0000
commit902bd2b10698d404d15ce8cfff500519a1df4adb (patch)
treef10db480e2709d6ab77bc12b82d07702ccbcfbae /ext/syck/emitter.c
parenteee581f9432b7a4d18f51bb09ca384954c91b1e9 (diff)
* ext/syck/emitter.c (syck_scan_scalar): set SCAN_WHITEEDGE flag
when scalar begins with newline. patches from Dave B <daz AT d10.karoo.co.uk> at [ruby-core:23019] and caleb clausen at [ruby-core:25851]. [ruby-core:23006][ruby-core:29925] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck/emitter.c')
-rw-r--r--ext/syck/emitter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/syck/emitter.c b/ext/syck/emitter.c
index eb01033653e..985bfb25003 100644
--- a/ext/syck/emitter.c
+++ b/ext/syck/emitter.c
@@ -570,7 +570,7 @@ syck_scan_scalar( int req_width, const char *cursor, long len )
flags |= SCAN_MANYNL_E;
}
if (
- ( len > 0 && ( cursor[0] == ' ' || cursor[0] == '\t' ) ) ||
+ ( len > 0 && ( cursor[0] == ' ' || cursor[0] == '\t' || cursor[0] == '\n' || cursor[0] == '\r' ) ) ||
( len > 1 && ( cursor[len-1] == ' ' || cursor[len-1] == '\t' ) )
) {
flags |= SCAN_WHITEEDGE;