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

View File

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