diff --git a/text/align.go b/text/align.go index 1cce7ec..c11b511 100644 --- a/text/align.go +++ b/text/align.go @@ -36,7 +36,8 @@ var ( func (a Align) Apply(text string, maxLength int) string { aComputed := a if aComputed == AlignAuto { - if reNumericText.MatchString(text) { + _, err := strconv.ParseFloat(text, 64) + if err == nil { // was able to parse a number out of the string aComputed = AlignRight } else { aComputed = AlignLeft