You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

angular2-markdown

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-markdown - npm Package Compare versions

Comparing version

to
1.2.3

2

package.json
{
"name": "angular2-markdown",
"version": "1.2.2",
"version": "1.2.3",
"license": "MIT",

@@ -5,0 +5,0 @@ "angular-cli": {},

@@ -47,14 +47,17 @@ import { Directive, OnInit, ElementRef , Input, Component} from '@angular/core';

fromHttpHtml(html) {
var h = '';
if (this.path.lastIndexOf('.md') < 0) {
let ext: any = this.path.split('.');
ext = ext[ext.length - 1];
html = `
var h: string = `
\`\`\`${ext}
${html._body}
${html.text()}
\`\`\`
`;
} else {
h = html.text();
}
html = this.process(this.prepare(html));
this.ele.innerHTML = html;
this.highlight(html);
h = this.process(this.prepare(h));
this.ele.innerHTML = h;
this.highlight(h);
}

@@ -75,4 +78,5 @@

*/
prepare(raw: string) {
return raw.split('\n').map((line) => line.trim()).join('\n');
prepare(raw: string) {
if(raw)
return raw.split('\n').map((line) => line.trim()).join('\n');
}

@@ -79,0 +83,0 @@