We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/marked-highlight/lib/index.umd.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/default.min.css"> </head> <body> <div id="content" class="markdown-body"></div> <script> const md = ` # h1 \`\`\`js console.log(123) \`\`\` ` document.getElementById('content').innerHTML = marked.parse(md, markedHighlight.markedHighlight({ emptyLangClass: 'hljs', langPrefix: 'hljs language-', highlight(code, lang, info) { console.log(code, lang, info) const language = hljs.getLanguage(lang) ? lang : 'plaintext'; return hljs.highlight(code, { language }).value; return code } })); </script> </body> </html>
The text was updated successfully, but these errors were encountered:
markedHighlight shouldn't be passed in to marked.parse. You should pass it to marked.use like the directions say.
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: