Skip to content

Commit

Permalink
fix-xmas-underline
Browse files Browse the repository at this point in the history
Credit: @raywu0123
PR-URL: #179
Close: #179
Reviewed-by: @isaacs
  • Loading branch information
raywu0123 authored and isaacs committed Jul 3, 2019
1 parent a81a8c4 commit 172f9ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/xmas.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = function (args, cb) {
'\u0020', '\u0020', '\u0020', '\u0020', '\u0020', '\u0020',
'\u0020', '\u2E1B', '\u2042', '\u2E2E', '&', '@', '\uFF61'
]
var oc = [21, 33, 34, 35, 36, 37]
var oc = [33, 34, 35, 36, 37]
var l = '\u005e'

function w (s) { process.stderr.write(s) }
Expand All @@ -25,6 +25,7 @@ module.exports = function (args, cb) {
var O = L * 2 - 2
var S = (M - O) / 2
for (i = 0; i < S; i++) w(' ')
w(x + '\u001b[21m')
w(x + '\u001b[32m' + f)
for (i = 0; i < O; i++) {
w(
Expand All @@ -33,6 +34,7 @@ module.exports = function (args, cb) {
)
}
w(x + '\u001b[32m' + b + '\n')
w(x + '\u001b[0m')
}
w(' ')
for (i = 1; i < H; i++) w('\u001b[32m' + l)
Expand Down

0 comments on commit 172f9ac

Please sign in to comment.