INNER CODE UNIT · JavaScript

handleDirective

DavidAnson/markdownlint · demo/default.js:35

  function handleDirective(directive) {
    const content = directive.content;
    delete directive.content;
    if (content) {
      this.tag("<blockquote>");
    }
    this.tag("<code>");
    this.raw(this.encode(JSON.stringify(directive)));
    this.tag("</code>");
    this.raw(content);
    if (content) {
      this.tag("</blockquote>");
    }
  }

  // Renders Markdown to HTML
  function render(markdown) {
    markdown = markdown.replace(markdownlint.frontMatterRe, "");

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…