diff --git a/src/AnsiPainter.coffee b/src/AnsiPainter.coffee index 6472553..9261a36 100644 --- a/src/AnsiPainter.coffee +++ b/src/AnsiPainter.coffee @@ -60,7 +60,7 @@ module.exports = class AnsiPainter _getStylesForTagName: (name) -> unless tags[name]? - throw Error "Unkown tag name `#{name}`" + throw Error "Unknown tag name `#{name}`" tags[name] diff --git a/src/ansiPainter/styles.coffee b/src/ansiPainter/styles.coffee index ea5f6df..83dcf59 100644 --- a/src/ansiPainter/styles.coffee +++ b/src/ansiPainter/styles.coffee @@ -43,7 +43,7 @@ styles.color = (str) -> return '' if str is 'none' code = codes[str] unless code? - throw Error "Unkown color `#{str}`" + throw Error "Unknown color `#{str}`" "\x1b[" + code + "m" @@ -51,7 +51,7 @@ styles.bg = (str) -> return '' if str is 'none' code = codes['bg-' + str] unless code? - throw Error "Unkown bg color `#{str}`" + throw Error "Unknown bg color `#{str}`" "\x1B[" + code + "m" diff --git a/src/layout/block/linePrependor/Default.coffee b/src/layout/block/linePrependor/Default.coffee index ac02a13..923672f 100644 --- a/src/layout/block/linePrependor/Default.coffee +++ b/src/layout/block/linePrependor/Default.coffee @@ -28,7 +28,7 @@ module.exports = class DefaultLinePrependor extends require './_LinePrependor' addToLeft = self.pad left addToRight = self.pad diff - left else - throw Error "Unkown alignment `#{alignment}`" + throw Error "Unknown alignment `#{alignment}`" output = addToLeft + char + addToRight else output = self.pad @_config.amount diff --git a/src/renderKid/styleApplier/_common.coffee b/src/renderKid/styleApplier/_common.coffee index e94114d..a23e3dc 100644 --- a/src/renderKid/styleApplier/_common.coffee +++ b/src/renderKid/styleApplier/_common.coffee @@ -7,14 +7,14 @@ module.exports = _common = if style.color? tagName = 'color-' + style.color unless AnsiPainter.tags[tagName]? - throw Error "Unkown color `#{style.color}`" + throw Error "Unknown color `#{style.color}`" tagsToAdd.push tagName if style.background? tagName = 'bg-' + style.background unless AnsiPainter.tags[tagName]? - throw Error "Unkown background `#{style.background}`" + throw Error "Unknown background `#{style.background}`" tagsToAdd.push tagName diff --git a/src/renderKid/styles/rule/DeclarationBlock.coffee b/src/renderKid/styles/rule/DeclarationBlock.coffee index 3bcf867..0df7248 100644 --- a/src/renderKid/styles/rule/DeclarationBlock.coffee +++ b/src/renderKid/styles/rule/DeclarationBlock.coffee @@ -21,7 +21,7 @@ module.exports = class DeclarationBlock return Arbitrary unless cls = declarationClasses[prop] - throw Error "Unkown property `#{prop}`. Write it as `_#{prop}` if you're defining a custom property" + throw Error "Unknown property `#{prop}`. Write it as `_#{prop}` if you're defining a custom property" return cls diff --git a/src/tools.coffee b/src/tools.coffee index 67df13f..489fd4d 100644 --- a/src/tools.coffee +++ b/src/tools.coffee @@ -72,7 +72,7 @@ module.exports = self = process.stdout.getWindowSize(1)[0] else if tty.getWindowSize tty.getWindowSize()[1] - else if process.stdout.columns and process.stdout.rows - process.stdout.rows + else if process.stdout.columns + process.stdout.columns if typeof cols is 'number' && cols > 30 then cols else 80 \ No newline at end of file