Fix dquote indentation.
This commit is contained in:
parent
36c4f8951e
commit
3868b83756
2 changed files with 8 additions and 2 deletions
|
@ -1816,6 +1816,10 @@ impl<T: Iterator<Item = char>> Scanner<T> {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (self.mark.col as isize) < self.indent {
|
||||||
|
return Err(ScanError::new(start_mark, "invalid identation in quoted scalar"));
|
||||||
|
}
|
||||||
|
|
||||||
leading_blanks = false;
|
leading_blanks = false;
|
||||||
self.consume_flow_scalar_non_whitespace_chars(
|
self.consume_flow_scalar_non_whitespace_chars(
|
||||||
single,
|
single,
|
||||||
|
@ -2055,7 +2059,10 @@ impl<T: Iterator<Item = char>> Scanner<T> {
|
||||||
let start_mark = self.mark;
|
let start_mark = self.mark;
|
||||||
|
|
||||||
if self.flow_level > 0 && (start_mark.col as isize) < indent {
|
if self.flow_level > 0 && (start_mark.col as isize) < indent {
|
||||||
return Err(ScanError::new(start_mark, "foo"));
|
return Err(ScanError::new(
|
||||||
|
start_mark,
|
||||||
|
"invalid indentation in flow construct",
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut string = String::new();
|
let mut string = String::new();
|
||||||
|
|
|
@ -315,7 +315,6 @@ fn expected_events(expected_tree: &str) -> Vec<String> {
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
static EXPECTED_FAILURES: &[&str] = &[
|
static EXPECTED_FAILURES: &[&str] = &[
|
||||||
// Misc
|
// Misc
|
||||||
"QB6E", // Indent for multiline double-quoted scalar
|
|
||||||
"S98Z", // Block scalar and indent problems?
|
"S98Z", // Block scalar and indent problems?
|
||||||
"U99R", // Comma is not allowed in tags
|
"U99R", // Comma is not allowed in tags
|
||||||
"WZ62", // Empty content
|
"WZ62", // Empty content
|
||||||
|
|
Loading…
Reference in a new issue