Fix CR/LF in literal scalar

This commit is contained in:
Yuheng Chen 2015-09-15 15:27:32 +08:00
parent 628cf4dd36
commit a29b0c12f6

View file

@ -1099,9 +1099,11 @@ impl<T: Iterator<Item=char>> Scanner<T> {
self.skip(); self.skip();
self.lookahead(1); self.lookahead(1);
} }
// break on EOF
if is_z(self.ch()) { break; }
self.lookahead(2); self.lookahead(2);
self.skip_line(); self.read_break(&mut leading_break);
// Eat the following intendation spaces and line breaks. // Eat the following intendation spaces and line breaks.
try!(self.block_scalar_breaks(&mut indent, &mut trailing_breaks)); try!(self.block_scalar_breaks(&mut indent, &mut trailing_breaks));