From 5461f1fbcb88ffa43fd8fa44e6fa1399140763da Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Thu, 28 Nov 2024 22:37:34 +0900 Subject: [PATCH] fix tab indent in single-quote --- scanner/scanner.go | 2 +- yaml_test_suite_test.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/scanner/scanner.go b/scanner/scanner.go index ae3eb3a..501534e 100644 --- a/scanner/scanner.go +++ b/scanner/scanner.go @@ -256,7 +256,7 @@ func (s *Scanner) scanSingleQuote(ctx *Context) (*token.Token, error) { isNewLine = true s.progressLine(ctx) continue - } else if c == ' ' && isFirstLineChar { + } else if isFirstLineChar && (c == ' ' || c == '\t') { continue } else if c != '\'' { value = append(value, c) diff --git a/yaml_test_suite_test.go b/yaml_test_suite_test.go index 6111f9a..5a54112 100644 --- a/yaml_test_suite_test.go +++ b/yaml_test_suite_test.go @@ -103,7 +103,6 @@ var failureTestNames = []string{ "spec-example-7-19-single-pair-flow-mappings", "spec-example-7-20-single-pair-explicit-entry", "spec-example-7-24-flow-nodes", - "spec-example-7-9-single-quoted-lines", "spec-example-8-10-folded-lines-8-13-final-empty-lines", "spec-example-8-15-block-sequence-entry-types", "spec-example-8-17-explicit-block-mapping-entries",