@@ -78,7 +78,7 @@ func (t *Table) extractMaxColumnLengthsFromRow(row rowStr, mci mergedColumnIndic
7878
7979func (t * Table ) extractMaxColumnLengthsFromRowForMergedColumns (colIdx int , mergedColumnLength int , mci mergedColumnIndices ) {
8080 numMergedColumns := mci .len (colIdx )
81- mergedColumnLength -= (numMergedColumns - 1 ) * text .RuneWidthWithoutEscSequences (t .style .Box .MiddleSeparator )
81+ mergedColumnLength -= (numMergedColumns - 1 ) * text .StringWidthWithoutEscSequences (t .style .Box .MiddleSeparator )
8282 maxLengthSplitAcrossColumns := mergedColumnLength / numMergedColumns
8383 if maxLengthSplitAcrossColumns > t .maxColumnLengths [colIdx ] {
8484 t .maxColumnLengths [colIdx ] = maxLengthSplitAcrossColumns
@@ -177,22 +177,22 @@ func (t *Table) initForRenderHideColumns() {
177177func (t * Table ) initForRenderMaxRowLength () {
178178 t .maxRowLength = 0
179179 if t .autoIndex {
180- t .maxRowLength += text .RuneWidthWithoutEscSequences (t .style .Box .PaddingLeft )
180+ t .maxRowLength += text .StringWidthWithoutEscSequences (t .style .Box .PaddingLeft )
181181 t .maxRowLength += len (fmt .Sprint (len (t .rows )))
182- t .maxRowLength += text .RuneWidthWithoutEscSequences (t .style .Box .PaddingRight )
182+ t .maxRowLength += text .StringWidthWithoutEscSequences (t .style .Box .PaddingRight )
183183 if t .style .Options .SeparateColumns {
184- t .maxRowLength += text .RuneWidthWithoutEscSequences (t .style .Box .MiddleSeparator )
184+ t .maxRowLength += text .StringWidthWithoutEscSequences (t .style .Box .MiddleSeparator )
185185 }
186186 }
187187 if t .style .Options .SeparateColumns {
188- t .maxRowLength += text .RuneWidthWithoutEscSequences (t .style .Box .MiddleSeparator ) * (t .numColumns - 1 )
188+ t .maxRowLength += text .StringWidthWithoutEscSequences (t .style .Box .MiddleSeparator ) * (t .numColumns - 1 )
189189 }
190190 for _ , maxColumnLength := range t .maxColumnLengths {
191- maxColumnLength += text .RuneWidthWithoutEscSequences (t .style .Box .PaddingLeft + t .style .Box .PaddingRight )
191+ maxColumnLength += text .StringWidthWithoutEscSequences (t .style .Box .PaddingLeft + t .style .Box .PaddingRight )
192192 t .maxRowLength += maxColumnLength
193193 }
194194 if t .style .Options .DrawBorder {
195- t .maxRowLength += text .RuneWidthWithoutEscSequences (t .style .Box .Left + t .style .Box .Right )
195+ t .maxRowLength += text .StringWidthWithoutEscSequences (t .style .Box .Left + t .style .Box .Right )
196196 }
197197}
198198
@@ -282,7 +282,7 @@ func (t *Table) initForRenderRowPainterColors() {
282282func (t * Table ) initForRenderRowSeparator () {
283283 t .rowSeparator = make (rowStr , t .numColumns )
284284 for colIdx , maxColumnLength := range t .maxColumnLengths {
285- maxColumnLength += text .RuneWidthWithoutEscSequences (t .style .Box .PaddingLeft + t .style .Box .PaddingRight )
285+ maxColumnLength += text .StringWidthWithoutEscSequences (t .style .Box .PaddingLeft + t .style .Box .PaddingRight )
286286 t .rowSeparator [colIdx ] = text .RepeatAndTrim (t .style .Box .MiddleHorizontal , maxColumnLength )
287287 }
288288}
0 commit comments