Non-breaking spaces in code snippets?

  • Unknown's avatar

    I want to add some (ascii, plain text, single width font) code output to a post, and I want it formatted, which includes some appropriate non-breaking spaces. How can I do this? I’ve tried the “code” and “pre” html tags in my posts, and I’ve also tried embedding such html code in [sourcecode language='html']…[/sourcecode}, but that doesn’t work. Whatever I do seems to eat up whitespace, especially at the beginning of a line.

    Thanks for this!

    -Alasdair

  • Unknown's avatar

    WordPress strips a lot of tags, the tags you are using may be forbidden.

  • Unknown's avatar

    Their are a few other posts that have to do with this matter, so try searching.

  • The topic ‘Non-breaking spaces in code snippets?’ is closed to new replies.