File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -523,9 +523,22 @@ func (f *Blueprint) renderLine(ctx tw.Formatting) {
523
523
524
524
isTotalPattern := false
525
525
526
+ // Case-insensitive check for "total"
527
+ if isHMergeStart && colIndex > 0 {
528
+ if prevCellCtx , ok := ctx .Row .Current [colIndex - 1 ]; ok {
529
+ if strings .Contains (strings .ToLower (prevCellCtx .Data ), "total" ) {
530
+ isTotalPattern = true
531
+ f .logger .Debugf ("renderLine: total pattern in row in %d" , colIndex )
532
+ }
533
+ }
534
+ }
535
+
536
+ // Get the alignment from the configuration
537
+ align = cellCtx .Align
538
+
526
539
// Override alignment for footer merged cells
527
540
if (ctx .Row .Position == tw .Footer && isHMergeStart ) || isTotalPattern {
528
- if align != tw .AlignRight {
541
+ if align == tw .AlignNone {
529
542
f .logger .Debugf ("renderLine: Applying AlignRight HMerge/TOTAL override for Footer col %d. Original/default align was: %s" , colIndex , align )
530
543
align = tw .AlignRight
531
544
}
You can’t perform that action at this time.
0 commit comments