How to use the defaults function from marked

Find comprehensive JavaScript marked.defaults code examples handpicked from public code repositorys.

345
346
347
348
349
350
351
352
353
354
 */

function Lexer(options) {
  this.tokens = [];
  this.tokens.links = {};
  this.options = options || marked.defaults;
  this.rules = block.normal;

  if (this.options.gfm) {
    if (this.options.tables) {
fork icon29
star icon167
watch icon19

2787
2788
2789
2790
2791
2792
2793
2794
2795
  })();
} // ==-- Parse WalkTokens extensions --== //


if (pack.walkTokens) {
  var _walkTokens = marked.defaults.walkTokens;

  opts.walkTokens = function (token) {
    pack.walkTokens.call(this, token);
fork icon2
star icon3
watch icon0

+ 23 other calls in file

23
24
25
26
27
28
29
30
31
32
    return JSON.parse('[' + text + ']');
}


function PdfParser(options) {
  marked.defaults.renderer = new PdfRenderer();  // override default

  this.tokens = [];
  this.token = null;
  this.options = options || marked.defaults;
fork icon0
star icon0
watch icon0

+ 7 other calls in file