From 73877a5a35c5ba5572091de9bafea756bfc81ccf Mon Sep 17 00:00:00 2001 From: Kim Biesbjerg Date: Mon, 8 Jul 2019 15:13:07 +0200 Subject: [PATCH] Add stripBOM --- src/cli/cli.ts | 2 +- src/utils/utils.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cli/cli.ts b/src/cli/cli.ts index 194f11c..545b9ad 100755 --- a/src/cli/cli.ts +++ b/src/cli/cli.ts @@ -103,7 +103,7 @@ const extractTask = new ExtractTask(cli.input, cli.output, { // Parsers const parsers: ParserInterface[] = [ new PipeParser(), - new DirectiveParser() + new DirectiveParser(), new ServiceParser() ]; if (cli.marker) { diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 75b95ef..bb0767e 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -16,3 +16,7 @@ export function extractComponentInlineTemplate(contents: string): string { } return ''; } + +export function stripBOM(contents: string): string { + return contents.trim(); +}