Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit ac0fae9

Browse files
author
Dimitar Kerezov
committed
Fix printMarkdown method parameters
Accept ...args rather than a single message
1 parent 90c4944 commit ac0fae9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

definitions/logger.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ interface ILogger {
77
info(formatStr?: any, ...args: string[]): void;
88
debug(formatStr?: any, ...args: string[]): void;
99
trace(formatStr?: any, ...args: string[]): void;
10-
printMarkdown(message: string): void;
10+
printMarkdown(...args: string[]): void;
1111

1212
out(formatStr?: any, ...args: string[]): void;
1313
write(...args: string[]): void;
1414

1515
prepare(item: any): string;
1616
printInfoMessageOnSameLine(message: string): void;
1717
printMsgWithTimeout(message: string, timeout: number): IFuture <void>;
18-
}
18+
}

logger.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class Logger implements ILogger {
119119
return printMsgFuture;
120120
}
121121

122-
public printMarkdown(message: string): void {
122+
public printMarkdown(...args: string[]): void {
123123
let opts = {
124124
unescape: true,
125125
link: chalk.red,
@@ -136,7 +136,7 @@ export class Logger implements ILogger {
136136
};
137137

138138
marked.setOptions({ renderer: new TerminalRenderer(opts) });
139-
let formattedMessage = marked(message);
139+
let formattedMessage = marked(util.format.apply(null, args));
140140
this.write(formattedMessage);
141141
}
142142

0 commit comments

Comments
 (0)