Comparing version 3.0.0-rc.8 to 3.0.0-rc.9
@@ -260,3 +260,3 @@ 'use strict'; | ||
for (const { definition, description } of options) { | ||
result += ` ${definition.padEnd(maxDefinitionLength)} ${format.formatMarkdownish(description, { format: this.format(colored), paragraphs: false })}`; | ||
result += ` ${this.format(colored).bold(definition.padEnd(maxDefinitionLength))} ${format.formatMarkdownish(description, { format: this.format(colored), paragraphs: false })}`; | ||
} | ||
@@ -263,0 +263,0 @@ } |
@@ -5,4 +5,8 @@ 'use strict'; | ||
const MAX_LINE_LENGTH = 80; | ||
const richLine = Array(MAX_LINE_LENGTH).fill(`━`); | ||
for (let t = 0; t <= 24; ++t) | ||
richLine[richLine.length - t] = `\x1b[38;5;${232 + t}m━`; | ||
const richFormat = { | ||
header: str => `\x1b[1m${str}${str.length < 79 ? ` ${`━`.repeat(79 - str.length)}` : `:`}\x1b[22m`, | ||
header: str => `\x1b[1m━━━ ${str}${str.length < MAX_LINE_LENGTH - 5 ? ` ${richLine.slice(str.length + 5).join(``)}` : `:`}\x1b[0m`, | ||
bold: str => `\x1b[1m${str}\x1b[22m`, | ||
@@ -46,2 +50,6 @@ error: str => `\x1b[31m\x1b[1m${str}\x1b[22m\x1b[39m`, | ||
}); | ||
// Highlight the code segments | ||
text = text.replace(/(\*\*)((?:.|[\n])*?)\1/g, ($0, $1, $2) => { | ||
return format.bold($1 + $2 + $1); | ||
}); | ||
return text ? `${text}\n` : ``; | ||
@@ -48,0 +56,0 @@ } |
{ | ||
"name": "clipanion", | ||
"version": "3.0.0-rc.8", | ||
"version": "3.0.0-rc.9", | ||
"main": "lib/advanced/index", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
195313
4620