From 26d9a5ef2a9555f5cc0098bd1a85a0d7bcbdfed5 Mon Sep 17 00:00:00 2001 From: Zhuyi Xue Date: Fri, 12 Jan 2018 12:05:15 -0800 Subject: [PATCH] updated README to use String.raw --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 56bbffc..cc9eb3e 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,13 @@ $ npm i react-mathjax --save ### Usage +Use `Stirng.raw` to avoid escaping javascript strings manually. + +You could render it at https://www.codecogs.com/latex/eqneditor.php. + ```js const MathJax = require('react-mathjax') -const tex = `f(x) = \\int_{-\\infty}^\\infty - \\hat f(\\xi)\\,e^{2 \\pi i \\xi x} - \\,d\\xi` +const tex = String.raw`f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} \,d\xi` module.exports = () => { return (