-
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
The EnlighterJS engine turns inline elements to block elements #2
Comments
@twhitehead Thanks for the patch, please could you supply some testing instructions and data. |
No problem, and thanks for the very quick reply. If you create a moodle page in html mode (e.g., a lesson) with the following context
and enable your plugin with the EnlighterJS engine, you should see that it renders the inline command as a block item (i.e., on its own line) like so
instead of an inline (i.e., inside the line) like it should
Reloading the page (possibly a shift+F5 will be required to avoid the browser caching the old version) after applying the patch should fix this. |
Correct EnlighnerJS.init block and inline selectors (close #2)
@twhitehead Sorry for the delay, just tested and accepted. Thanks for the test information. I'll just need to update the PHPUnit test. Also, I tested on M3.11, so the filter should be ok there too. |
No worries. That was plenty quick. 😁 Thanks so much for doing the testing for me. |
… thanks to Tyson Whitehead (https://github.com/twhitehead) for the patch - #2 & #3.
@twhitehead No problem, I've just credited you in the readme and I'm going to do a proper release on Moodle.org soon. |
Excellent. I'll see if our admin will update us now! Thanks again. 😄 |
Noticed all my inline elements are being turned into block elements by the EnlightnerJS engine as shown in this screenshot from our moodle (clearly I didn't want
ssh
broken out into its own line each time!)From the manual, the first argument passed to the
EnlightnerJS.init
is a selector for block elements, and the second for inline elements. This plugin calls EnlightnerJS.init with the samepre
(block) andcode
(inline) selector specification for bothI expect this is can be resolved by simply only specifying the block elements (
pre
) for the first and only the inline elements (code
) for the secondThe text was updated successfully, but these errors were encountered: