@@ -132,7 +132,7 @@ func (b *ConfigBuilder) WithFooterAlignment(align tw.Align) *ConfigBuilder {
132
132
}
133
133
134
134
// WithFooterAutoFormat enables or disables automatic formatting (e.g., title case) for footer cells.
135
- func (b * ConfigBuilder ) WithFooterAutoFormat (autoFormat bool ) * ConfigBuilder {
135
+ func (b * ConfigBuilder ) WithFooterAutoFormat (autoFormat tw. State ) * ConfigBuilder {
136
136
b .config .Footer .Formatting .AutoFormat = autoFormat
137
137
return b
138
138
}
@@ -184,7 +184,7 @@ func (b *ConfigBuilder) WithHeaderAlignment(align tw.Align) *ConfigBuilder {
184
184
}
185
185
186
186
// WithHeaderAutoFormat enables or disables automatic formatting (e.g., title case) for header cells.
187
- func (b * ConfigBuilder ) WithHeaderAutoFormat (autoFormat bool ) * ConfigBuilder {
187
+ func (b * ConfigBuilder ) WithHeaderAutoFormat (autoFormat tw. State ) * ConfigBuilder {
188
188
b .config .Header .Formatting .AutoFormat = autoFormat
189
189
return b
190
190
}
@@ -247,7 +247,7 @@ func (b *ConfigBuilder) WithRowAlignment(align tw.Align) *ConfigBuilder {
247
247
}
248
248
249
249
// WithRowAutoFormat enables or disables automatic formatting for row cells.
250
- func (b * ConfigBuilder ) WithRowAutoFormat (autoFormat bool ) * ConfigBuilder {
250
+ func (b * ConfigBuilder ) WithRowAutoFormat (autoFormat tw. State ) * ConfigBuilder {
251
251
b .config .Row .Formatting .AutoFormat = autoFormat
252
252
return b
253
253
}
@@ -348,7 +348,7 @@ func (ff *FooterFormattingBuilder) WithAlignment(align tw.Align) *FooterFormatti
348
348
}
349
349
350
350
// WithAutoFormat enables or disables automatic formatting for footer cells.
351
- func (ff * FooterFormattingBuilder ) WithAutoFormat (autoFormat bool ) * FooterFormattingBuilder {
351
+ func (ff * FooterFormattingBuilder ) WithAutoFormat (autoFormat tw. State ) * FooterFormattingBuilder {
352
352
ff .config .AutoFormat = autoFormat
353
353
return ff
354
354
}
@@ -466,7 +466,7 @@ func (hf *HeaderFormattingBuilder) WithAlignment(align tw.Align) *HeaderFormatti
466
466
}
467
467
468
468
// WithAutoFormat enables or disables automatic formatting for header cells.
469
- func (hf * HeaderFormattingBuilder ) WithAutoFormat (autoFormat bool ) * HeaderFormattingBuilder {
469
+ func (hf * HeaderFormattingBuilder ) WithAutoFormat (autoFormat tw. State ) * HeaderFormattingBuilder {
470
470
hf .config .AutoFormat = autoFormat
471
471
return hf
472
472
}
@@ -587,7 +587,7 @@ func (rf *RowFormattingBuilder) WithAlignment(align tw.Align) *RowFormattingBuil
587
587
}
588
588
589
589
// WithAutoFormat enables or disables automatic formatting for row cells.
590
- func (rf * RowFormattingBuilder ) WithAutoFormat (autoFormat bool ) * RowFormattingBuilder {
590
+ func (rf * RowFormattingBuilder ) WithAutoFormat (autoFormat tw. State ) * RowFormattingBuilder {
591
591
rf .config .AutoFormat = autoFormat
592
592
return rf
593
593
}
@@ -981,7 +981,7 @@ func defaultConfig() Config {
981
981
Formatting : tw.CellFormatting {
982
982
AutoWrap : tw .WrapTruncate ,
983
983
Alignment : tw .AlignCenter ,
984
- AutoFormat : true ,
984
+ AutoFormat : tw . On ,
985
985
MergeMode : tw .MergeNone ,
986
986
},
987
987
Padding : tw.CellPadding {
@@ -992,7 +992,7 @@ func defaultConfig() Config {
992
992
Formatting : tw.CellFormatting {
993
993
AutoWrap : tw .WrapNormal ,
994
994
Alignment : tw .AlignLeft ,
995
- AutoFormat : false ,
995
+ AutoFormat : tw . Off ,
996
996
MergeMode : tw .MergeNone ,
997
997
},
998
998
Padding : tw.CellPadding {
@@ -1003,7 +1003,7 @@ func defaultConfig() Config {
1003
1003
Formatting : tw.CellFormatting {
1004
1004
AutoWrap : tw .WrapNormal ,
1005
1005
Alignment : tw .AlignRight ,
1006
- AutoFormat : false ,
1006
+ AutoFormat : tw . Off ,
1007
1007
MergeMode : tw .MergeNone ,
1008
1008
},
1009
1009
Padding : tw.CellPadding {
@@ -1034,6 +1034,7 @@ func mergeCellConfig(dst, src tw.CellConfig) tw.CellConfig {
1034
1034
if src .Formatting .MergeMode != 0 {
1035
1035
dst .Formatting .MergeMode = src .Formatting .MergeMode
1036
1036
}
1037
+
1037
1038
dst .Formatting .AutoFormat = src .Formatting .AutoFormat
1038
1039
1039
1040
if src .Padding .Global != (tw.Padding {}) {
@@ -1119,6 +1120,7 @@ func mergeConfig(dst, src Config) Config {
1119
1120
dst .Row = mergeCellConfig (dst .Row , src .Row )
1120
1121
dst .Footer = mergeCellConfig (dst .Footer , src .Footer )
1121
1122
dst .Stream = mergeStreamConfig (dst .Stream , src .Stream )
1123
+
1122
1124
return dst
1123
1125
}
1124
1126
0 commit comments