Closed twhitehead closed 3 years ago
@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
You can run the command <code>ls -l</code> to list all your files in long format.
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
You can run the command
ls -l
to list all your files in long format.
instead of an inline (i.e., inside the line) like it should
You can run the command ls -l to list all your files in long format.
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.
@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. :grin:
Thanks so much for doing the testing for me.
@twhitehead No problem, I've just credited you in the readme and I'm going to do a proper release on Moodle.org soon.
@twhitehead FYI: https://moodle.org/plugins/filter_synhi/3.7.1.2/24260.
Excellent. I'll see if our admin will update us now! Thanks again. :smile:
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 second