-
Notifications
You must be signed in to change notification settings - Fork 6
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 and backticks #4
Comments
Hi @dmenne , you are right the regexp is to greedy and as I can see this plugin only works with Grav v0.1.0- for now. I need to rewrite this plugin a bit using Grav features, which got recently added to core. Will see what I can; I have to prioritize some things. Do you need the fix of this plugin immediately or can I think about in the next week? |
No hurry. The people who read this http://menne-biomed.de/blog/multiple-indexes-stan can read latex. |
Any chance? |
Yes. I've come up something with this. But time is limited. You must wait for it a little longer. Sorry. |
Hi @dmenne , I just updated a pre-release version in the develop branch. In order to use and install this plugin you now need Grav v1.1.0+. Switch to the the testing release and install Mathjax v1.5.0-beta.1. If you experience any further bugs, please add a comment to this thread. Best, |
Sorry to reopen this. On my local server, everything was perfect. On my remote server, with same IIS configuration, same php 7.0, on activating mathjax I get an error on all pages (not only those with mathjax) and the following in the log: |
I believe you forgot to test the case when there is no formula on a page. Checking for hashes corrects that; line 222, classes/mathjax.php
|
@dmenne You are totally right! I haven' tested this case. However initializing protected $hashes = []; should solve that problem, too. You can test it and report back. I'll work on the code and improve it a bit more. |
Works. |
@dmenne FYI I made a new release and some further small changes in the develop branch (the latter can be downloaded only via GitHub). Please read the changelog before updating. There is one breaking change. Don't know if it touches you. |
Not tested thoroughly, but looks ok. |
@dmenne Ok, thanks! Released stable version MathJax v1.5.0 today. |
This was reported before in getgrav/grav#929, but proved to be an issue only when mathjax plugin is activated.
Grav 1.1.0 rc3, Plugin Mathjax 1.40
Sample code, simplified from Rcmd (R + knitr) comes in separate zip file because is shows problems with code blocks.
There seems to be a problem when there are 2 code blocks. Grav generates the following wrong output (if we accept that Catalina should be Catilina):
MarkdownPad and knitr produce correct output:
Looks like some greedy regexps involved trying to catch the last backticks.....
item.zip
Gruß von TÜ nach TÜ
The text was updated successfully, but these errors were encountered: