-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
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
Markdown processed incorrectly inside Markdown fragments added with element attributes #2507
Comments
Seems to have been introduced with 3.8.0, as 3.7.0 works just like 3.6.0. |
I don't know why it changed, but it is preprocessed by markdown. You might need an extra escape so |
Never mind, it's actually the other way around, you don't need the backslashes anymore (the reason it's red, is because mathjax flags it as an unknown command). Just a
Don't know why it changed though, it's not something in the math plugin, I guess something in markdown.js. Very strange how in
the top line works, but not the bottom. |
Thanks for your reply, @burgerga. Removing the backslash indeed fixes rendering of the formula. The other issue still remains: markup that is part of a fragment is not applied. So where you would have <!-- .element: class="fragment" -->This is an _example_ fragment. You would expect the word "example" to emphasised, e.g. |
I've added Reveal 3.9.2 to the repo. |
7.3.11 |
I'm not sure what that means, @Brickaction.... |
Yes, I guess this is the real issue, so it's not MathJax related at all actually. The markdown is simply not processed anymore (if markdown would be processed, the backslash in @hakimel do you have any idea what changed? (also happens in v4) |
I'm not sure I correctly understand... Something like "Markdown is not processed inside Reveal fragments" ? |
Yes almost, to be more specific "Markdown processed incorrectly inside Markdown fragments added with element attributes", because if you modify https://revealjs.com/markdown/#element-attributes to
this also gives very unexpected results. |
I wonder if the issue was introduced when the revealjs dependency on marked was updated to v0.6.0. That update happened in reveal 3.8.0. Possibly as a result of this change to marked. It might be worth dropping in the older v0.5.2 library to see if the upgrade to v0.6.0 is indeed the culprit. |
Good catch, @gitpitch. I've changed my repo to use Reveal 3.8.0 with the Marked version that shipped with 3.7.0. Reverting the backslash-change makes the slide behave as before. |
Just the EDIT:
|
That was with marked.js and markdown.js from Reveal 3.7.0.
With Reveal 3.8.0 and both marked.js and markdown.js from Reveal 3.7.0, I see appearing (in order):
|
Neither do I but I feel like those numbers are important |
Reported as troll. |
Ah, so the issue is not
This is then the second issue 😞, which has probably never worked as intended
the documentation should probably read
to circumvent this. |
I'm not sure if it is clear, but a nasty workaround is to use HTML markup in Markdown: - <!-- .element: class="fragment" data-fragment-index="1" --> <em>Item 1</em>
- <!-- .element: class="fragment" data-fragment-index="1" --> _Item 2_ The first item is rendered correctly, the second is not. |
In my Reveal.js presentations I have some math equations. I prefer to have my slides in external Markdown files.
Now, in Reveal.js 3.6.0 this worked great, but in 3.8.0 it doesn't work anymore. The equations have a red backslash, some markup is not processed (showing _note_ instead of note) and the animations are out of order.
Initially, 3.6.0 renders as

But in 3.8.0, this becomes

In the end state, 3.6.0 renders as

Whereas 3.8.0 renders as

I've created a repo with both versions in it.
The text was updated successfully, but these errors were encountered: