Skip to content

Commit

Permalink
fix: show extra line between examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Apr 7, 2018
1 parent 7efb8b9 commit d05ec75
Show file tree
Hide file tree
Showing 3 changed files with 275 additions and 270 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Jeff Dickey @jdxcode",
"bugs": "https://github.com/oclif/plugin-help/issues",
"dependencies": {
"@oclif/command": "^1.4.6",
"@oclif/command": "^1.4.7",
"chalk": "^2.3.2",
"indent-string": "^3.2.0",
"lodash.template": "^4.4.0",
Expand All @@ -15,17 +15,17 @@
},
"devDependencies": {
"@oclif/config": "^1.3.62",
"@oclif/dev-cli": "^1.4.3",
"@oclif/dev-cli": "^1.4.4",
"@oclif/errors": "^1.0.3",
"@oclif/plugin-legacy": "^1.0.6",
"@oclif/plugin-legacy": "^1.0.7",
"@oclif/plugin-plugins": "^1.0.8",
"@oclif/test": "^1.0.1",
"@oclif/tslint": "^1.0.2",
"@oclif/test": "^1.0.4",
"@oclif/tslint": "^1.1.0",
"@types/chai": "^4.1.2",
"@types/indent-string": "^3.0.0",
"@types/lodash.template": "^4.4.3",
"@types/mocha": "^5.0.0",
"@types/node": "^9.6.0",
"@types/node": "^9.6.2",
"@types/strip-ansi": "^3.0.0",
"@types/wrap-ansi": "^3.0.0",
"chai": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class CommandHelp {

protected examples(examples: string[] | undefined | string): string | undefined {
if (!examples || !examples.length) return
let body = castArray(examples).map(a => this.render(a)).join('\n')
let body = castArray(examples).map(a => this.render(a)).join('\n\n')
return [
bold('EXAMPLE' + (examples.length > 1 ? 'S' : '')),
indent(wrap(body, this.opts.maxWidth - 2, {trim: false, hard: true}), 2),
Expand Down
Loading

0 comments on commit d05ec75

Please sign in to comment.