Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MathJax interferes with Markdown fences #1358

Closed
jywarren opened this issue Mar 28, 2017 · 9 comments
Closed

MathJax interferes with Markdown fences #1358

jywarren opened this issue Mar 28, 2017 · 9 comments
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute JavaScript

Comments

@jywarren
Copy link
Member

What happened just before the problem occurred

@khamba posted some code with code fences, like:

// code here

You can see the original raw markdown code here: https://publiclab.org/notes/raw/14004

But the mathjax library we've added parsed it and tried to evaluate it as a latex math expression, and caused an error:

screenshot 2017-03-28 at 12 27 39 pm

Mathjax is included here: https://github.com/publiclab/plots2/blob/master/app/views/layouts/application.html.erb#L20

@vincegando had previously set Mathjax to use the default delimiters: e09451e

I wonder if we can specify things differently to avoid conflicting with code fences? I think we need to read some of the MathJax documentation to check.

@jywarren jywarren added bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute JavaScript labels Mar 28, 2017
@aspriya
Copy link
Collaborator

aspriya commented Apr 6, 2017

I would like to help for this. Will start reading MathJax documentation and inform about suggestions.

@aspriya
Copy link
Collaborator

aspriya commented Apr 6, 2017

According to this post we may need to change the CDN
https://www.mathjax.org/cdn-shutting-down/

@jywarren
Copy link
Member Author

jywarren commented Apr 6, 2017 via email

@jywarren
Copy link
Member Author

jywarren commented Apr 6, 2017 via email

@aspriya
Copy link
Collaborator

aspriya commented Apr 6, 2017

Yep, it's there.
https://www.npmjs.com/package/mathjax

@jywarren
Copy link
Member Author

jywarren commented Apr 10, 2017 via email

aspriya pushed a commit to aspriya/plots2 that referenced this issue Apr 12, 2017
@aspriya
Copy link
Collaborator

aspriya commented Apr 13, 2017

Oh found the issue. We are using RDiscount to render the markdown in published notes. And the issue is current rdiscount gem version does not support fencing code blocks with ```. Found these details using following articles.
article 1 :Here in Code section it says nothing about fecing code blocks with ```.
article 2 :Here it states that older versions of RDiscout does not support ``` fences.

So I will try including the current version of gem in Gemfile.

@aspriya
Copy link
Collaborator

aspriya commented Apr 13, 2017

Doing that solved the issue. now it is rendering correctly as follows.
selection_111

@jywarren
Copy link
Member Author

jywarren commented Apr 13, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute JavaScript
Projects
None yet
Development

No branches or pull requests

2 participants