Consider the following demo code:
const markdown = `
# Demo
Markdown supports *italic* and **bold** text among other things
`.trim();
console.log(chromafi(markdown, {lang: 'markdown'}));
This will produce the following error:
~/Demo/node_modules/chromafi/index.js:74
return opts.colors[color](childText)
^
TypeError: opts.colors[color] is not a function
at filter (~/Demo/node_modules/chromafi/index.js:74:29)
at ~/Demo/node_modules/chromafi/index.js:71:48
at Array.map (<anonymous>)
at filter (~/Demo/node_modules/chromafi/index.js:71:31)
at ~/Demo/node_modules/chromafi/index.js:146:16
at Array.forEach (<anonymous>)
at syntaxHlStr (~/Demo/node_modules/chromafi/index.js:143:8)
at chromafi (~/Demo/node_modules/chromafi/index.js:387:11)
at Object.<anonymous> (~/Demo/demo.js:9:13)
at Module._compile (internal/modules/cjs/loader.js:759:30)
This seems to be specific to Markdown since {lang: 'html'} works just fine.
Node v12.0.0
macOS 10.14.6 (18G103)
Consider the following demo code:
This will produce the following error:
This seems to be specific to Markdown since
{lang: 'html'}works just fine.Node v12.0.0
macOS 10.14.6 (18G103)