From 2ec8cde1486d3583e077986b87f6ab01a19d4615 Mon Sep 17 00:00:00 2001 From: scissorsneedfoodtoo Date: Tue, 26 Jun 2018 23:26:28 +0900 Subject: [PATCH] Renabled MathJax and testing default 3324 delimeters to see if other challenge descriptions break. --- packages/learn/src/head/index.js | 4 ++-- .../templates/Challenges/components/Side-Panel.js | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/learn/src/head/index.js b/packages/learn/src/head/index.js index 2f8d71872e..51da3baab3 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) + .concat(favicons, styleSheets, mathjax) .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 7a040fac2b..a108a5b987 100644 --- a/packages/learn/src/templates/Challenges/components/Side-Panel.js +++ b/packages/learn/src/templates/Challenges/components/Side-Panel.js @@ -26,7 +26,7 @@ const mapDispatchToProps = dispatch => dispatch ); -// const MathJax = global.MathJax; +const MathJax = global.MathJax; const propTypes = { description: PropTypes.arrayOf(PropTypes.string), @@ -43,17 +43,20 @@ export class SidePanel extends PureComponent { // MathJax.Hub.Config({ // tex2jax: { inlineMath: [['$', '$'], ['\\(', '\\)']] } // }); + 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('');