Skip to content

Commit

Permalink
let numbers with commas can also be aligned to right
Browse files Browse the repository at this point in the history
  • Loading branch information
WakeupTsai committed Oct 23, 2018
1 parent be2c049 commit 7a7e123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion table.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (
)

var (
decimal = regexp.MustCompile(`^-*\d*\.?\d*$`)
decimal = regexp.MustCompile(`^(?:\d{1,3}(?:,\d{3})*|\d+)(?:\.\d+)?$`)
percent = regexp.MustCompile(`^-*\d*\.?\d*$%$`)
)

Expand Down

0 comments on commit 7a7e123

Please sign in to comment.