* Inline Lexer & Compiler
(links, options)
| 509 | */ |
| 510 | |
| 511 | function 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 |
nothing calls this directly
no outgoing calls
no test coverage detected