Posting sample code is a pain.

  • Unknown's avatar

    … And editing is worst.

    My post: https://brianbyexperience.wordpress.com/2015/06/02/how-to-have-your-asp-net-site-convert-images-to-embedable-strings/

    I found out that the code tag does not preserve or protect my code. All formatting using spaces gets wiped. And if I have a blank line, the code tag is removed from my last line of code, and moved to the first blank line! I thought this was MY code using MY standards when I write and entry for people to read.

    So I used pre. Yay, spacing preserved. However…

    My lt and gt characters get converted into actual lt and gt characters when I have to edit my text. Which then, if I am not paying attention causes my code to become broken or hidden. MEGA FAIL! Glad that I didn’t have to use AMP or I would be in real trouble.

    This is an ongoing headache.

    It would be helpful if you would allow me to switch everything over to MarkDown, so I can write with the same formatting that I use on StackOverflow and GitHub

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

  • Unknown's avatar

    Have you tried using one of these shortcodes for posting source code: https://en.support.wordpress.com/code/posting-source-code/

  • Unknown's avatar

    I didn’t notice that the your linked page was using [ rather than lt right away.

    So my complaint is changing to, The code button on the editor should be setup to use this proper formatting rather than the code html tag, since the code html tag is broken in this editor.

    That minor change to the editor would have prevented this post.

    So thx for the information.

  • The topic ‘Posting sample code is a pain.’ is closed to new replies.