Renabled MathJax and testing default 3324 delimeters to see if other challenge descriptions break.

This commit is contained in:
scissorsneedfoodtoo
2018-06-26 23:26:28 +09:00
committed by Mrugesh Mohapatra
parent 9f524ff929
commit 2ec8cde148
2 changed files with 10 additions and 7 deletions

View File

@@ -1,10 +1,10 @@
import favicons from './favicons'; import favicons from './favicons';
import meta from './meta'; import meta from './meta';
import styleSheets from './styleSheets'; import styleSheets from './styleSheets';
// import mathjax from './mathjax'; import mathjax from './mathjax';
const metaAndStyleSheets = meta const metaAndStyleSheets = meta
.concat(favicons, styleSheets) .concat(favicons, styleSheets, mathjax)
.map((element, i) => ({ ...element, key: `meta-stylesheet-${i}` })); .map((element, i) => ({ ...element, key: `meta-stylesheet-${i}` }));
export default metaAndStyleSheets; export default metaAndStyleSheets;

View File

@@ -26,7 +26,7 @@ const mapDispatchToProps = dispatch =>
dispatch dispatch
); );
// const MathJax = global.MathJax; const MathJax = global.MathJax;
const propTypes = { const propTypes = {
description: PropTypes.arrayOf(PropTypes.string), description: PropTypes.arrayOf(PropTypes.string),
@@ -43,17 +43,20 @@ export class SidePanel extends PureComponent {
// MathJax.Hub.Config({ // MathJax.Hub.Config({
// tex2jax: { inlineMath: [['$', '$'], ['\\(', '\\)']] } // tex2jax: { inlineMath: [['$', '$'], ['\\(', '\\)']] }
// }); // });
MathJax.Hub.Config({
tex2jax: { inlineMath: [['$$', '$$']] }
});
} }
componentDidMount() { componentDidMount() {
// MathJax.Hub.Queue(['Typeset', MathJax.Hub, MathJax.Hub.Queue(['Typeset', MathJax.Hub,
// document.querySelector('.challenge-instructions')]); document.querySelector('.challenge-instructions')]);
this.props.initConsole(''); this.props.initConsole('');
} }
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {
// MathJax.Hub.Queue(['Typeset', MathJax.Hub, MathJax.Hub.Queue(['Typeset', MathJax.Hub,
// document.querySelector('.challenge-instructions')]); document.querySelector('.challenge-instructions')]);
const { title, initConsole } = this.props; const { title, initConsole } = this.props;
if (title !== prevProps.title) { if (title !== prevProps.title) {
initConsole(''); initConsole('');