diff --git a/dist/react-katex.js b/dist/react-katex.js index 094feec..05533f4 100644 --- a/dist/react-katex.js +++ b/dist/react-katex.js @@ -4,7 +4,7 @@ return (root.ReactKaTeX = factory(React, katex)); }); } else if (typeof exports === 'object') { - module.exports = factory(require('react/addons'), require('katex')); + module.exports = factory(require('react/addons'), require('katex-build')); } else { root.ReactKaTeX = factory(root.React, root.katex); } diff --git a/dist/react-katex.min.js b/dist/react-katex.min.js index 35b5f5a..8a87ce9 100644 --- a/dist/react-katex.min.js +++ b/dist/react-katex.min.js @@ -1 +1 @@ -!function(e,t){"function"==typeof define&&define.amd?define(["react-with-addons","katex-build"],function(n,a){return e.ReactKaTeX=t(n,a)}):"object"==typeof exports?module.exports=t(require("react/addons"),require("katex")):e.ReactKaTeX=t(e.React,e.katex)}(this,function(e,t){"use strict";var n={},a=e.addons.PureRenderMixin,r={getDefaultProps:function(){return{math:!1}},getInitialState:function(){return{html:this.generateHtml(this.props)}},componentWillUpdate:function(e,t){t.html=this.generateHtml(e)},generateHtml:function(e){return t.renderToString(e.math||e.children,{displayMode:this.displayMode})}},i=e.createClass({displayName:"InlineMath",mixins:[a,r],displayMode:!1,render:function(){return e.createElement("span",{dangerouslySetInnerHTML:{__html:this.state.html}})}}),s=e.createClass({displayName:"BlockMath",mixins:[a,r],displayMode:!0,render:function(){return e.createElement("div",{dangerouslySetInnerHTML:{__html:this.state.html}})}});return n.InlineMath=i,n.BlockMath=s,n}); \ No newline at end of file +!function(e,t){"function"==typeof define&&define.amd?define(["react-with-addons","katex-build"],function(n,a){return e.ReactKaTeX=t(n,a)}):"object"==typeof exports?module.exports=t(require("react/addons"),require("katex-build")):e.ReactKaTeX=t(e.React,e.katex)}(this,function(e,t){"use strict";var n={},a=e.addons.PureRenderMixin,r={getDefaultProps:function(){return{math:!1}},getInitialState:function(){return{html:this.generateHtml(this.props)}},componentWillUpdate:function(e,t){t.html=this.generateHtml(e)},generateHtml:function(e){return t.renderToString(e.math||e.children,{displayMode:this.displayMode})}},i=e.createClass({displayName:"InlineMath",mixins:[a,r],displayMode:!1,render:function(){return e.createElement("span",{dangerouslySetInnerHTML:{__html:this.state.html}})}}),l=e.createClass({displayName:"BlockMath",mixins:[a,r],displayMode:!0,render:function(){return e.createElement("div",{dangerouslySetInnerHTML:{__html:this.state.html}})}});return n.InlineMath=i,n.BlockMath=l,n}); \ No newline at end of file