From 9333729dcae303452ddb2761dbea93cb02242983 Mon Sep 17 00:00:00 2001 From: Stuart Taylor Date: Wed, 20 Jun 2018 10:48:56 +0100 Subject: [PATCH] Temp: Remove MathJax (#186) --- packages/learn/src/head/index.js | 4 ++-- .../Challenges/components/Side-Panel.js | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/learn/src/head/index.js b/packages/learn/src/head/index.js index 51da3baab3..2f8d71872e 100644 --- a/packages/learn/src/head/index.js +++ b/packages/learn/src/head/index.js @@ -1,10 +1,10 @@ import favicons from './favicons'; import meta from './meta'; import styleSheets from './styleSheets'; -import mathjax from './mathjax'; +// import mathjax from './mathjax'; const metaAndStyleSheets = meta - .concat(favicons, styleSheets, mathjax) + .concat(favicons, styleSheets) .map((element, i) => ({ ...element, key: `meta-stylesheet-${i}` })); export default metaAndStyleSheets; diff --git a/packages/learn/src/templates/Challenges/components/Side-Panel.js b/packages/learn/src/templates/Challenges/components/Side-Panel.js index e5d636ac2e..7a040fac2b 100644 --- a/packages/learn/src/templates/Challenges/components/Side-Panel.js +++ b/packages/learn/src/templates/Challenges/components/Side-Panel.js @@ -24,9 +24,9 @@ const mapDispatchToProps = dispatch => initConsole }, dispatch - ); + ); -const MathJax = global.MathJax; +// const MathJax = global.MathJax; const propTypes = { description: PropTypes.arrayOf(PropTypes.string), @@ -39,19 +39,21 @@ const propTypes = { export class SidePanel extends PureComponent { constructor(props) { super(props); - this.bindTopDiv = this.bindTopDiv.bind(this); - MathJax.Hub.Config({ - tex2jax: { inlineMath: [['$', '$'], ['\\(', '\\)']] } - }); + this.bindTopDiv = this.bindTopDiv.bind(this); + // MathJax.Hub.Config({ + // tex2jax: { inlineMath: [['$', '$'], ['\\(', '\\)']] } + // }); } componentDidMount() { - MathJax.Hub.Queue(['Typeset', MathJax.Hub, document.querySelector('.challenge-instructions')]); + // MathJax.Hub.Queue(['Typeset', MathJax.Hub, + // document.querySelector('.challenge-instructions')]); this.props.initConsole(''); } componentDidUpdate(prevProps) { - MathJax.Hub.Queue(['Typeset', MathJax.Hub, document.querySelector('.challenge-instructions')]); + // MathJax.Hub.Queue(['Typeset', MathJax.Hub, + // document.querySelector('.challenge-instructions')]); const { title, initConsole } = this.props; if (title !== prevProps.title) { initConsole('');