Temp: Remove MathJax (#186)

pull/18188/head
Stuart Taylor 2018-06-20 10:48:56 +01:00 committed by Mrugesh Mohapatra
parent 10b3b747d6
commit 9333729dca
2 changed files with 12 additions and 10 deletions

View File

@ -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;

View File

@ -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('');