allow border option to be a string.

This commit is contained in:
Christopher Jeffrey 2013-07-29 17:22:09 -05:00
parent 1f17a48af3
commit 82322ac017

View File

@ -1720,6 +1720,9 @@ function Element(options) {
this.border = options.border;
if (this.border) {
if (typeof this.border === 'string') {
this.border = { type: this.border };
}
this.border.type = this.border.type || 'bg';
if (this.border.type === 'ascii') this.border.type = 'line';
this.border.ch = this.border.ch || ' ';