Generalising the empty array fix to map

This commit is contained in:
Mike Farah
2026-08-03 13:31:47 +10:00
parent b74aefd55f
commit 7862131c9c
5 changed files with 19 additions and 7 deletions
+1 -1
View File
@@ -677,7 +677,7 @@ func (te *tomlEncoder) colorizeToml(input []byte) []byte {
// Table sections - [section] or [[array]]
// Only treat '[' as a table section if it appears at the start of the line
// (possibly after whitespace). This avoids incorrectly colouring inline arrays like
// (possibly after whitespace). This avoids incorrectly colouring inline arrays like
// "ports = [8000, 8001]" as table sections.
if ch == '[' {
isSectionHeader := true