Refactored decoder responsibilities (#1402)

- improved comment handling
- yaml decoder now responsible for leading content work around
This commit is contained in:
Mike Farah
2022-10-28 14:16:46 +11:00
committed by GitHub
parent 46c32f4c79
commit 880397d549
42 changed files with 529 additions and 329 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ func processFormatScenario(s formatScenario, decoder Decoder, encoder Encoder) s
writer := bufio.NewWriter(&output)
if decoder == nil {
decoder = NewYamlDecoder()
decoder = NewYamlDecoder(ConfiguredYamlPreferences)
}
inputs, err := readDocuments(strings.NewReader(s.input), "sample.yml", 0, decoder)