From 83c5e1bc832680ea28c32764c738fb1a6407ed8e Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Thu, 8 Dec 2022 13:33:06 +1100 Subject: [PATCH] Include blank new lines in leading header preprocessing #1462 --- acceptance_tests/leading-seperator.sh | 58 ++++++++++++++++++++ pkg/yqlib/decoder_yaml.go | 8 +++ pkg/yqlib/doc/operators/comment-operators.md | 3 + pkg/yqlib/doc/operators/path.md | 1 + pkg/yqlib/operator_anchors_aliases_test.go | 3 +- pkg/yqlib/operator_comments_test.go | 2 +- pkg/yqlib/operator_multiply_test.go | 4 +- pkg/yqlib/operator_traverse_path_test.go | 3 +- 8 files changed, 75 insertions(+), 7 deletions(-) diff --git a/acceptance_tests/leading-seperator.sh b/acceptance_tests/leading-seperator.sh index 9419ecf5344..5aceacbe815 100755 --- a/acceptance_tests/leading-seperator.sh +++ b/acceptance_tests/leading-seperator.sh @@ -34,6 +34,64 @@ EOM assertEquals "$expected" "$X" } + +testLeadingSeperatorWithNewlinesNewDoc() { + cat >test.yml <test.yml <test.yml <