Rename style parsing functions

This commit is contained in:
Caleb Bassi
2019-02-23 16:54:20 -08:00
parent f8e30bacd3
commit fd5a830d7a
5 changed files with 16 additions and 13 deletions

View File

@@ -42,7 +42,7 @@ func (self *List) Draw(buf *Buffer) {
}
for row := self.topRow; row < uint(len(self.Rows)) && point.Y < self.Inner.Max.Y; row++ {
cells := ParseText(self.Rows[row], self.TextStyle)
cells := ParseStyles(self.Rows[row], self.TextStyle)
if self.WrapText {
cells = WrapCells(cells, uint(self.Inner.Dx()))
}

View File

@@ -28,7 +28,7 @@ func NewParagraph() *Paragraph {
func (self *Paragraph) Draw(buf *Buffer) {
self.Block.Draw(buf)
cells := ParseText(self.Text, self.TextStyle)
cells := ParseStyles(self.Text, self.TextStyle)
if self.WrapText {
cells = WrapCells(cells, uint(self.Inner.Dx()))
}

View File

@@ -71,7 +71,7 @@ func (self *Table) Draw(buf *Buffer) {
// draw row cells
for j := 0; j < len(row); j++ {
col := ParseText(row[j], rowStyle)
col := ParseStyles(row[j], rowStyle)
// draw row cell
if len(col) > columnWidths[j] || self.TextAlign == AlignLeft {
for _, cx := range BuildCellWithXArray(col) {