diff --git a/README.md b/README.md index 0de7dbd..fd2f316 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,12 @@ Include it in your javascript ```javascript var md = require('markdown-it')(), - mk = require('markdown-it-katex'); + mk = require('markdown-it-katex'); md.use(mk); + +// double backslash is required for javascript strings, but not html input +var result = md.render('# Math Rulez! \n $\\sqrt{3x-1}+(1+x)^2$'); ``` Include the KaTeX stylesheet in your html: diff --git a/package.json b/package.json index 9ffc067..54f995e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "markdown-it-katex", - "version": "1.0.8", + "version": "1.0.9", "description": "Fast math support for markdown-it with KaTeX", "main": "index.js", "scripts": {