Markdown / code markup support broken pretty badly

  • Unknown's avatar

    Hello.

    The recently announced Markdown support is… pretty broken, as is the WordPress API support for markup as well.

    I detailed the two issues I’ve found on a blog post, with a workaround – though the workaround isn’t especially pleasant.

    http://jamesgdriscoll.wordpress.com/2014/01/07/hosted-wordpress-markdown-support-is-badly-broken/

    I wasn’t at my clearest in explaining the issue, so let me know if I need to flesh it out further. I did search the forum and find that at least one of these issues was reported before, over a month ago. The workaround, on the other hand, I found almost by accident on another site.

    The blog I need help with is: (visible only to logged in users)

  • Hi there – Thanks very much for the detailed report! I’ve passed this feedback along to the developer handling Markdown, and he says you guys already chatted on Twitter. ;)

  • Unknown's avatar

    New WordPress (and WordPress.com) user here, and I can confirm that the Markdown support for code is pretty patchy. This is particularly apparent for me, as I am posting code in the R language, which uses the <- symbol for assign (curious to see if it will work in this comment or not …).

    What happens is that code blocks marked with the triple backtick remain intact, but inline code blocks have the < converted to < in the final post.

    The blog I need help with is codedocean.wordpress.com

  • Unknown's avatar

    Apparently the behaviour is different here, as the inline code is rendered properly (though not as inline for some reason). Also, the final < should have displayed as <.

  • Unknown's avatar

    Dammit, the renderer is replacing the HTML code for less than with the symbol, even when it is wrapped with backticks. See the post [here](http://codedocean.wordpress.com/2014/01/19/switching-from-matlab-to-r-part-1/) for an example of what I mean.

  • Unknown's avatar

    Still broken, though often less badly.

    But just try to use `html to post a nav tag. Or many other tags. Strips them out, and munges the code. No warning.

    Still kinda unhappy here. I’m sure I’m not the only one trying to use this.

  • Unknown's avatar

    OK, let’s try that again – use triple back tick with the html short code. Inside the triplebacktick area, use a nav tag. It doesn’t work. And of course if you escape the lt and gt characters, that doesn’t work either.

    I can try to use the html short code inside a [code] block, but that doesn’t work with the remote API.

  • Hi all – I’ve passed your feedback along to the dev working on Markdown, and I’ll let you know when I have updates.

  • Unknown's avatar

    Hi All!

    I’m having the same issues with fenced code blocks as Jim describes. My workaround is:

    <pre markdown="1">(code snippet goes here)

    Haven’t tested extensively with so-called “poison” characters, but it worked for me.

    HTH!

  • Unknown's avatar

    Argh!

    That should be:

    <pre markdown="1"><code>(code snippet goes here)</code></pre>

    Hope it comes out right this time!

  • Unknown's avatar

    Hey everyone! Thanks to all of you for reporting this issue, and your patience while I got to the bottom of a tricky situation. Everything inside `-delimited code blocks should now be properly preserved and displayed.

    If you have a previous post that produced issues, please try to edit it and verify that “Preview” produces the expected results before saving it.

  • Unknown's avatar

    Haha, even I got bitten here. Different formatting. :) Everything inside triple-~ delimited blocks should render properly now.

  • Unknown's avatar

    Hi Matt,

    Well, I let my enthusiasm get the better of me in my previous posts. I’m still having problems with fenced code blocks in a markdown post. For instance, unlikely strings such as:

    <em><<€>></em>

    will not render verbatim. And when I re-edit the post, any bare ampersands have been transmogrified into “ampersand amp semi-colon.”

    I’ve had better luck with the code shortcode, but it is rewriting “ampersand hash 8364 semi-colon” as the Euro symbol. To get the literal string I want, I had to resort to “ampersand ampersand hash 35 semi-colon 8364 semi-colon.” Ugh!

    Please fix these little glitches. Markdown support combined with post by email is something I’ve been waiting for since forever, and it would be a shame if the process was made unusable by a few irritating bugs which could have easily been fixed… which is exactly what happened at Posterous.

  • Unknown's avatar

    PS: Argh! It did it again. In the unlikely string example, that should be “ampersand hash 8364 semi-colon” and not the Euro symbol.

  • The topic ‘Markdown / code markup support broken pretty badly’ is closed to new replies.