More fixes towards invalid tabs.
This commit is contained in:
parent
da233d5426
commit
870f2359dd
2 changed files with 6 additions and 3 deletions
|
@ -1819,6 +1819,12 @@ impl<T: Iterator<Item = char>> Scanner<T> {
|
|||
while is_blank(self.look_ch()) || is_break(self.ch()) {
|
||||
if is_blank(self.ch()) {
|
||||
if leading_blanks && (self.mark.col as isize) < indent && self.ch() == '\t' {
|
||||
// If our line contains only whitespace, this is not an error.
|
||||
// Skip over it.
|
||||
self.skip_ws_to_eol(SkipTabs::Yes);
|
||||
if is_breakz(self.ch()) {
|
||||
continue;
|
||||
}
|
||||
return Err(ScanError::new(
|
||||
start_mark,
|
||||
"while scanning a plain scalar, found a tab",
|
||||
|
|
|
@ -299,10 +299,7 @@ fn expected_events(expected_tree: &str) -> Vec<String> {
|
|||
static EXPECTED_FAILURES: &[&str] = &[
|
||||
// These seem to be plain bugs
|
||||
// TAB as start of plain scalar instead of whitespace
|
||||
"Y79Y-04", // unexpected pass
|
||||
"Y79Y-05", // unexpected pass
|
||||
// TABs in whitespace-only lines
|
||||
"DK95-04",
|
||||
// TABs after marker ? or : (space required?)
|
||||
"Y79Y-07",
|
||||
"Y79Y-09",
|
||||
|
|
Loading…
Reference in a new issue