-
Notifications
You must be signed in to change notification settings - Fork 2
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
Using code blocks in Markdown renders <code> block in output #8
Comments
No idea how to solve this either. |
I digged a bit into the problem. The HTML output by Moodle from the Markdown is as follows :
I tried modifying 'theinit' => "EnlighterJS.init('synhi pre', 'synhi code', {theme: '".$config->enlighterjsstyle."', indent : 4});"
to
'theinit' => "EnlighterJS.init('synhi pre code.scala', 'synhi code', {theme: '".$config->enlighterjsstyle."', indent : 4});" Doing so, the I would love to help you find a solution but I have no idea how to develop Moodle plugins... |
@pmudry Sure there is a rule that no 'code' in 'pre', so if so then filter out. |
@pmudry Still not sure how to fix this. Is it not the issue with the markdown? Aside from the Moodle code, what is the ideal logic / solution? |
@pmudry Humm, what if the 'pre' tag was stripped when combined with a 'code' tag before being highlighted. |
@pmudry Please upgrade to the next release 39.1.1 and this should be fixed. |
Hi !
When using the Moodle markdown text processor, code blocks are rendered correctly but they include the
<code>
tag.Example :
Is rendered as :
The problem is probably because the Markdown preprocessor first creates a
<pre>
tag in which a<code>
tag is embedded. I don't know how to solve this however.Cheers !
The text was updated successfully, but these errors were encountered: