2

Today, I had an issue with displaying some .htaccess code when trying to help someone. I see it would be easy to do this, since we do have some .htaccess questions that I can give some direct code to place within the (dot)file to make peoples likes easier.

Would it be possible to add this feature into Pro Webmasters instead of us having to use the HTML tags?

  • 2
    Code like within a .htaccess file can be added to a question or answer by clicking the {} (Preformatted text) button from the menu bar, or to comments by placing backticks around the code like: ` <code> ` Did you mean something else? – dan Mar 26 '14 at 17:29
  • Now I feel dumb as can be. Oh lordy. Very, very dumb question of mine to ask. Thanks @dan – user37204 Mar 26 '14 at 17:32
  • No worries, it's not obvious. Welcome to the site by the way :-) – dan Mar 26 '14 at 17:36
1

I just did this, as it's come up a few times where there are legitimate on-topic reasons to have this. Not just .htaccess questions, but sitemaps and all kinds of configurations needed for context in posts can be XML, JSON, etc.

See this post - there's no default style, so you'll have to specify it, but that's rather easy to do. It can be done in a preformatted block, but folks are so used to just using code highlighting on other sites, enabling it to this limited level seems to make sense.

You must log in to answer this question.