Open Mikaela opened 9 years ago
@Kovah Is Wikitten using the Markdown
or the MarkdownExtra
parser? Fenced code blocks are not a base feature of Markdown and are only available with Markdown Extra.
@michelf Markdown Extra
For all I can see, the above parses correctly with Markdown Extra. This can be tested on the PHP Markdown Dingus. Perhaps the input above isn't the actual input given to Markdown Extra or perhaps Wikitten is using a very old version. I can't open the .md file linked to test the whole file on the Dingus, so there's not really anything I can investigate right now.
Here's one: https://devwiki.invoiceplane.com/v2/Index.md The "Then run the following commands:" should be one command per line but it's a single line.
So you think this is a problem with how Wikitten handles the Markdown?
If I copy-paste the Markdown source for that document in the Dingus, set the filter to PHP Markdown Extra, and hit Convert, I get a correctly formatted code block. So it should work.
But I see you're using PHP Markdown Extra 1.2.6. Backtick fenced code blocks were added in 1.2.8. That's why it doesn't work. You can use a tilde ~~~
fence instead, or update the version of PHP Markdown.
Thanks for your help, will create a pull request for that! :tada:
I updated Wikitten to the latest Markdown Extra library and tried to use ~~~ for codeblocks but they won't be rendered... Is there a setting that needs to be enabled??? :worried:
See https://github.com/victorstanciu/Wikitten/pull/53 for the corresponding pull request.
Here you need to use /Michelf/MarkdownExtra
if you want to use the Markdown Extra parser.
Thank you!
For example:
from https://wiki.mikaela.info/Me%20%28Mikaela%29/New%C2%A0systems.md becomes
ufw allow 113 ufw allow 631 ufw allow 100XX ufw limit 22 ufw enable
while it should become
this can be also reproduced with most of other markdown files on wiki.mikaela.infothis site was removed.This issue was originally reported at https://github.com/victorstanciu/Wikitten/issues/48 and was told to be moved here in https://github.com/victorstanciu/Wikitten/issues/48#issuecomment-83134632.