Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return '';
},
langPrefix: 'lang-',
smartypants: false,
renderer: new marked.Renderer(),
};
options = marked.getDefaults();
options = marked.defaults;
function callback(err: string, markdown: string) {
console.log('Callback called!');
return markdown;
}
let myOldMarked: typeof marked = marked.options(options);
myOldMarked = marked.setOptions(options);
console.log(marked('1) I am using __markdown__.'));
console.log(marked('2) I am using __markdown__.', options));
console.log(marked('3) I am using __markdown__.', callback));
console.log(marked('4) I am using __markdown__.', options, callback));
console.log(marked.parse('5) I am using __markdown__.'));
console.log(marked.parse('6) I am using __markdown__.', options));
console.log(marked.parse('7) I am using __markdown__.', callback));
console.log(marked.parse('8) I am using __markdown__.', options, callback));
const text = 'Something';
const tokens: marked.TokensList = marked.lexer(text, options);
console.log(marked.parser(tokens));