{"size": 467, "ext": "js", "max_stars_repo_path": "JavaScript/JS - Application/Demos and slides/03. AMD and SystemJS/demos/1. markdown-component/jspm_packages/github/guybedford/markdown-component@0.1.0/markdown-component.js", "max_stars_repo_name": "jsdelivrbot/Telerik-Academy-3", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "JavaScript/JS - Application/Demos and slides/03. AMD and SystemJS/demos/1. markdown-component/jspm_packages/github/guybedford/markdown-component@0.1.0/markdown-component.js", "max_issues_repo_name": "jsdelivrbot/Telerik-Academy-3", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "JavaScript/JS - Application/Demos and slides/03. AMD and SystemJS/demos/1. markdown-component/jspm_packages/github/guybedford/markdown-component@0.1.0/markdown-component.js", "max_forks_repo_name": "jsdelivrbot/Telerik-Academy-3", "max_forks_repo_forks_event_min_datetime": "2018-12-07T18:08:42.000Z", "max_forks_repo_forks_event_max_datetime": "2018-12-07T18:08:42.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 25.9444444444, "max_line_length": 70, "alphanum_fraction": 0.7173447537}
import showdown from 'showdown';
import prism from 'prism';

import 'prism/themes/prism-okaidia.css!';

var converter = new showdown.converter();

class XMarkdownComponent extends HTMLElement {
  createdCallback() {
    this.innerHTML = converter.makeHtml(
      this.innerHTML.split('\n').map((line) => line.trim()).join('\n')
    );
    prism.highlightAll(this.querySelectorAll('code'));
  }
}

document.registerElement('x-markdown-component', XMarkdownComponent);
