How to use the marked.inlineLexer function in marked

To help you get started, we’ve selected a few marked examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Automattic / mongoose / docs / source / acquit.js View on Github external
var block = blocks[i];
    block.identifier = toHtmlIdentifier(acquit.trimEachLine(block.contents));
    block.contents = marked(acquit.trimEachLine(block.contents));
    if (block.comments && block.comments.length) {
      var last = block.comments.length - 1;
      block.comments[last] =
        marked(acquit.trimEachLine(block.comments[last]));
    }
    if (block.code) {
      b.code = hl.highlight('javascript', b.code).value;
    }

    for (var j = 0; j < block.blocks.length; ++j) {
      var b = block.blocks[j];
      b.identifier = toHtmlIdentifier(acquit.trimEachLine(b.contents));
      b.contents = marked.inlineLexer(acquit.trimEachLine(b.contents), []);
      if (b.comments && b.comments.length) {
        var last = b.comments.length - 1;
        b.comments[last] = marked(acquit.trimEachLine(b.comments[last]));
      }
      if (b.code) {
        b.code = hl.highlight('javascript', b.code).value;
      }
    }
  }

  exports[file.output] = {
    title: file.title,
    acquitBlocks: blocks,
    suffix: file.suffix,
    destination: file.output,
    guide: true
github benjycui / mark-twain / src / parser.js View on Github external
parseInlineText(text) {
    return marked.inlineLexer(text, this.links);
  }
}
github Sage / carbon / src / components / i18n / i18n.js View on Github external
    return inline ? str => _marked.inlineLexer(str, []) : _marked;
  }
github hashicorp / nomad / website / components / featured-slider / index.jsx View on Github external
url={feature.image.url}
                        alt={feature.image.alt}
                        aspectRatio={single ? [16, 10, 500] : [16, 9, 500]}
                      />
                    
                  
                  <div>
                    {single &amp;&amp; (
                      <div>
                        <img alt="{feature.logo.alt}">
                      </div>
                    )}
                    <h3>
                    <p>
                    </p></h3></div>
github Squidex / squidex / frontend / app / framework / angular / pipes / markdown.pipe.ts View on Github external
public transform(text: string | null | undefined): string {
        if (text) {
            return marked.inlineLexer(text, [], { renderer });
        } else {
            return '';
        }
    }
}
github onevcat / UniWebView-Docs / script / build-api.js View on Github external
noticeText() {
    var notice = "";
    if (this.entry.notice) {
      notice = `<div class="warning custom-block">
  <p class="custom-block-title">NOTICE</p>
  <p>
        ${marked.inlineLexer(
          this.entry.notice,
          [],
          {}
        )}
  </p>
</div>\n`;
    }
    return notice;
  }
github onevcat / UniWebView-Docs / OldDocs / build-api.js View on Github external
noticeText() {
    var notice = "";
    if (this.entry.notice) {
      notice = `<p class="tip">${marked.inlineLexer(
        this.entry.notice,
        [],
        {}
      )}</p>\n`;
    }
    return notice;
  }
github HermesMessenger / Hermes / src / web / ts / utils / markdown.ts View on Github external
export function parseMD (md: string): string {
  return marked.inlineLexer(sanitize(md), [])
}