Need help? Check out our Support site, then

Code Tag Whitespace

  1. I know a couple of blogging coder friends, and they seem to have ditched the built-in code tags and use their own plugins, using the WordPress software and their own hosts. I don't have that option right now, though.

    The major disadvantage of the built-in code tag is that tabs and multiple spaces all get converted to one space, causing beautiful code to become unreadable and ugly.

    I'd like to humbly suggest that multiple spaces are treated as multiple spaces and that a tabsize option be added to the code tag? I.e. <code tabsize=8>my code</code>

    Any possibility for this?

  2. use
    <code><pre><br /> some code here<br /> </pre></code>


  3. Hey kamel, great tip!

    I notice the tab size is 8, which should suit most ASCII texts, but not all. Any way to change it?

  4. not really sure, no.
    pre stands for 'preformatted', so you could try just pasting in something with a different tab size, and seeing if it picks it up.

    i'm not much of an ASCII guy.

  5. ASCII has no tab size information, no. Each tab is just an ASCII code 9 character. So I guess not?

  6. You could use a text editor that converts tabs to spaces on the fly and then use the code/pre tags.

  7. Have you tried just using the pre tags without the code tag? That's how I normally put code in HTML.

Topic Closed

This topic has been closed to new replies.

About this Topic