Fixed sort dropping head comment #1181

This commit is contained in:
Mike Farah
2022-04-14 12:19:15 +10:00
parent 6f9f80cc48
commit ea66a73f43
4 changed files with 20 additions and 8 deletions
+9
View File
@@ -79,6 +79,15 @@ var sortByOperatorScenarios = []expressionScenario{
"D0, P[], (!!seq)::[{a: false, b: 1}, {a: false, b: 3}, {a: true, b: 2}]\n",
},
},
{
skipDoc: true,
description: "head comment",
document: "# abc\n- def\n# ghi",
expression: `sort`,
expected: []string{
"D0, P[], (!!seq)::# abc\n- def\n# ghi\n",
},
},
}
func TestSortByOperatorScenarios(t *testing.T) {