MCPcopy Create free account
hub / github.com/socketstream/socketstream / InlineLexer

Function InlineLexer

docs/js/marked.js:511–530  ·  view source on GitHub ↗

* Inline Lexer & Compiler

(links, options)

Source from the content-addressed store, hash-verified

509 */
510
511function InlineLexer(links, options) {
512 this.options = options || marked.defaults;
513 this.links = links;
514 this.rules = inline.normal;
515
516 if (!this.links) {
517 throw new
518 Error('Tokens array requires a `links` property.');
519 }
520
521 if (this.options.gfm) {
522 if (this.options.breaks) {
523 this.rules = inline.breaks;
524 } else {
525 this.rules = inline.gfm;
526 }
527 } else if (this.options.pedantic) {
528 this.rules = inline.pedantic;
529 }
530}
531
532/**
533 * Expose Inline Rules

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected