UNPKG

ng-realmark

Version:

Real-time Markdown W/ Markdown three way merge

44 lines (43 loc) 1.33 kB
import { Sanitizer } from '@angular/core'; import 'rxjs/add/operator/toPromise'; import { ShowdownConfig, Revision } from '../config'; export declare class ComparedLine { type: string; text: string; originalLine: number; newLine: number; format: string; } export declare class RealMarkService { private sanitizer; private codeBlock; private flavor; private headerLinks; private tableOfContents; constructor(config: ShowdownConfig, sanitizer: Sanitizer); /** * legacy entry point used for the directive */ fromInput(raw: string): string; /** * legacy Promise entry point */ fromInputPromise(raw: string): Promise<string>; getTableOfContents(): any; /** * main function of class, converts markdown to html with showdown. */ process(markdown: string): string; mergeMarkdown(patchVersion: Revision, originalVersion: Revision, liveVersion: Revision): { content: string; conflicts: any; }; /** * public function to compare each line one by one for changes. Return resolved promise */ compareMarkdown(content: string, compared: string, showDeleted: boolean, raw: boolean, codeBlock?: string): ComparedLine[]; /** * builds return object for each line */ private buildReturnLine; }