posting command line codes

  • Unknown's avatar

    I run a linux blog and need to be able to post text without it being reformatted by wordpress.

    like “&” becomes something like this if you copy/paste it : “&amp”

    This breaks the code.

    the sourcecode tags aren’t usable because they put numbers before them, thus it again breaks the code.

    How would I just type text with it being reformatted?

    code tags don’t seem to work

  • Unknown's avatar

    You could use html-entities, but that would be bothersome if you post large reams of code..?

  • Unknown's avatar

    You could link to a pastebin web site.

    I thought there was an option to click on a link in the [ sourcecode ] tag to view the raw source code without numbers.

    How do I post source code?

    When you click on “View Plain” hyperlink, it opens the code up in a new browser without the line numbers.

  • Unknown's avatar

    html entities is what is causing the problem.

    I’m typing something but html changes it.

  • Unknown's avatar

    jamesewelsh,

    that plain view advise helped, but it isn’t ideal.

    any other suggestions?

  • Unknown's avatar

    Yeah, I’m not too fond of the sourcecode tag either. It’s okay, but I don’t use it.

    Can you post an example of how the the ampersands being converted to the HTML safe form of the ampersand (like “&amp ;”) is causing a problem? Is it a display problem or the problem when a user copy/pastes the code, it’s not preserving the original ampersand, etc.

  • The topic ‘posting command line codes’ is closed to new replies.