Skip to content

Commit 302a6be

Browse files
Christian DavisChristian Davis
Christian Davis
authored and
Christian Davis
committedSep 9, 2018
clean up typos, getCols returns cols instead of rows
1 parent 1e24098 commit 302a6be

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed
 

‎src/AnsiPainter.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ module.exports = class AnsiPainter
6060

6161
_getStylesForTagName: (name) ->
6262
unless tags[name]?
63-
throw Error "Unkown tag name `#{name}`"
63+
throw Error "Unknown tag name `#{name}`"
6464

6565
tags[name]
6666

‎src/ansiPainter/styles.coffee

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ styles.color = (str) ->
4343
return '' if str is 'none'
4444
code = codes[str]
4545
unless code?
46-
throw Error "Unkown color `#{str}`"
46+
throw Error "Unknown color `#{str}`"
4747

4848
"\x1b[" + code + "m"
4949

5050
styles.bg = (str) ->
5151
return '' if str is 'none'
5252
code = codes['bg-' + str]
5353
unless code?
54-
throw Error "Unkown bg color `#{str}`"
54+
throw Error "Unknown bg color `#{str}`"
5555

5656
"\x1B[" + code + "m"
5757

‎src/layout/block/linePrependor/Default.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = class DefaultLinePrependor extends require './_LinePrependor'
2828
addToLeft = self.pad left
2929
addToRight = self.pad diff - left
3030
else
31-
throw Error "Unkown alignment `#{alignment}`"
31+
throw Error "Unknown alignment `#{alignment}`"
3232
output = addToLeft + char + addToRight
3333
else
3434
output = self.pad @_config.amount

‎src/renderKid/styleApplier/_common.coffee

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ module.exports = _common =
77
if style.color?
88
tagName = 'color-' + style.color
99
unless AnsiPainter.tags[tagName]?
10-
throw Error "Unkown color `#{style.color}`"
10+
throw Error "Unknown color `#{style.color}`"
1111

1212
tagsToAdd.push tagName
1313

1414
if style.background?
1515
tagName = 'bg-' + style.background
1616
unless AnsiPainter.tags[tagName]?
17-
throw Error "Unkown background `#{style.background}`"
17+
throw Error "Unknown background `#{style.background}`"
1818

1919
tagsToAdd.push tagName
2020

‎src/renderKid/styles/rule/DeclarationBlock.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = class DeclarationBlock
2121
return Arbitrary
2222

2323
unless cls = declarationClasses[prop]
24-
throw Error "Unkown property `#{prop}`. Write it as `_#{prop}` if you're defining a custom property"
24+
throw Error "Unknown property `#{prop}`. Write it as `_#{prop}` if you're defining a custom property"
2525

2626
return cls
2727

‎src/tools.coffee

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ module.exports = self =
7272
process.stdout.getWindowSize(1)[0]
7373
else if tty.getWindowSize
7474
tty.getWindowSize()[1]
75-
else if process.stdout.columns and process.stdout.rows
76-
process.stdout.rows
75+
else if process.stdout.columns
76+
process.stdout.columns
7777

7878
if typeof cols is 'number' && cols > 30 then cols else 80

0 commit comments

Comments
 (0)
Please sign in to comment.