From abbf803a0b2ec332187fcdec28bb8d89297db567 Mon Sep 17 00:00:00 2001 From: jfcere Date: Wed, 20 Jun 2018 23:29:40 -0400 Subject: [PATCH] Fix build prod --- lib/src/markdown.service.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/src/markdown.service.ts b/lib/src/markdown.service.ts index e722cdc9..cac34156 100644 --- a/lib/src/markdown.service.ts +++ b/lib/src/markdown.service.ts @@ -1,6 +1,7 @@ import { HttpClient } from '@angular/common/http'; import { Injectable, Optional } from '@angular/core'; import { parse, Renderer } from 'marked'; +import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { MarkedOptions } from './marked-options'; @@ -30,12 +31,12 @@ export class MarkdownService { } } - compile(markdown: string, markedOptions = this.options) { + compile(markdown: string, markedOptions = this.options): string { const precompiled = this.precompile(markdown); return parse(precompiled, markedOptions); } - getSource(src: string) { + getSource(src: string): Observable { if (!this.http) { throw new Error(errorSrcWithoutHttpClient); } @@ -51,7 +52,7 @@ export class MarkdownService { } } - private handleExtension(src: string, markdown: string) { + private handleExtension(src: string, markdown: string): string { const extension = src ? src.split('.').splice(-1).join() : null; @@ -60,7 +61,7 @@ export class MarkdownService { : markdown; } - private precompile(markdown: string) { + private precompile(markdown: string): string { if (!markdown) { return ''; }