feat: enable MathJax for Project Euler challenges (#38017)

* feat: enable MathJax for Project Euler challenges

Enables MathJax to render mathematical formulae for some Project Euler problems

* refactor: DRY out script insertion

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Kristofer Koishigawa
2020-01-07 20:14:12 +09:00
committed by Ahmad Abdolsaheb
parent 6809578044
commit 849e78d72e
3 changed files with 14 additions and 7 deletions

View File

@ -64,7 +64,10 @@ export const onRenderBody = ({
/>
];
if (pathname.includes('/learn/coding-interview-prep/rosetta-code')) {
if (
pathname.includes('/learn/coding-interview-prep/rosetta-code') ||
pathname.includes('/learn/coding-interview-prep/project-euler')
) {
scripts.push(
<script
async={false}