Fixed CSV content starting with # issue #2076

This commit is contained in:
Mike Farah
2024-06-29 15:04:07 +10:00
parent 7e1722510a
commit 0b7d4b799c
4 changed files with 36 additions and 2 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ func (dec *csvObjectDecoder) convertToNode(content string) *CandidateNode {
node, err := parseSnippet(content)
// if we're not auto-parsing, then we wont put in parsed objects or arrays
// but we still parse scalars
if err != nil || (!dec.prefs.AutoParse && node.Kind != ScalarNode) {
if err != nil || (!dec.prefs.AutoParse && (node.Kind != ScalarNode || node.Value != content)) {
return createScalarNode(content, content)
}
return node