From 4ed1a482681de6297fab334b22617d42e864cf13 Mon Sep 17 00:00:00 2001 From: Waylon Flinn Date: Fri, 11 Mar 2016 09:37:47 -0600 Subject: [PATCH] more complete example --- README.md | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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": {