Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
fix: wrap commit body at 72 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
KnisterPeter committed Nov 30, 2016
1 parent 4637225 commit d4089f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@knisterpeter/standard-tslint": "^1.0.3",
"@types/mocha": "^2.2.32",
"@types/node": "^6.0.40",
"@types/wrap-ansi": "2.0.14",
"conventional-changelog-lint": "1.1.0",
"cz-customizable": "4.0.0",
"husky": "0.11.9",
Expand All @@ -57,7 +58,8 @@
},
"dependencies": {
"execa": "0.5.0",
"sander": "0.6.0"
"sander": "0.6.0",
"wrap-ansi": "2.1.0"
},
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as execa from 'execa';
import {join} from 'path';
import * as sander from 'sander';
import * as vscode from 'vscode';
import * as wrap from 'wrap-ansi';

export async function activate(context: vscode.ExtensionContext): Promise<void> {
const czConfig = await readCzConfig();
Expand Down Expand Up @@ -184,7 +185,7 @@ class ConventionalCommitMessage {
public async getBody(): Promise<void> {
if (this.next) {
this.next = await ask('Provide a LONGER description of the change (optional). Use "|" to break new line',
input => this.body = input.replace('|', '\n'));
input => this.body = wrap(input.replace('|', '\n'), 72, {hard: true}));
}
}

Expand Down

0 comments on commit d4089f9

Please sign in to comment.