Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix-xmas-underline
Credit: @raywu0123
PR-URL: #179
Close: #179
Reviewed-by: @isaacs
  • Loading branch information
raywu0123 authored and isaacs committed Jul 3, 2019
commit 172f9aca67a66ee303c17f90a994cd52fc66552a
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