Trim Dockerfile commands to fix UI

Docker is (for some reason) adding an extra space, so trim the command before parsing

Fixes https://jira.prod.coreos.systems/browse/QS-57
This commit is contained in:
Joseph Schorr 2017-11-10 13:29:55 -05:00
parent 6bc39a0b8c
commit 0217ef34ea

View file

@ -33,6 +33,7 @@ export class DockerfileCommandComponent {
}
private getCommandKind(command: string): string {
command = command.trim();
if (!command) { return ''; }
var space = command.indexOf(' ');
@ -40,6 +41,7 @@ export class DockerfileCommandComponent {
}
private getCommandTitleHtml(command: string): string {
command = command.trim();
if (!command) { return ''; }
var kindHandlers = {