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
index.html
<!DOCTYPE html> <html> <head> <title>index</title> <meta charset="UTF-8"/> <script src="./js/showdown.min.js"></script> <script src="./js/showdown-prettify.min.js"></script> <script src="./js/main.js"></script> </head> <body> </body> </html>
main.js
showdown.setFlavor('github'); var converter = new showdown.Converter({extensions: ['prettify']}); var input = "```js\n" + "function add(a, b) { console.log(); }\n" + "```"; var html = converter.makeHtml(input); console.log(html);
output
<pre class="prettyprint linenums"><code class="js language-js">function add(a, b) { console.log(); }</code></pre>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
index.html
main.js
output
The text was updated successfully, but these errors were encountered: