Skip to content

Commit

Permalink
Fix build prod
Browse files Browse the repository at this point in the history
  • Loading branch information
jfcere committed Jun 21, 2018
1 parent 977afd1 commit abbf803
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/src/markdown.service.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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<string> {
if (!this.http) {
throw new Error(errorSrcWithoutHttpClient);
}
Expand All @@ -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;
Expand All @@ -60,7 +61,7 @@ export class MarkdownService {
: markdown;
}

private precompile(markdown: string) {
private precompile(markdown: string): string {
if (!markdown) {
return '';
}
Expand Down

0 comments on commit abbf803

Please sign in to comment.