Suggestion for PoSh code in posts

I've noticed that if I put a fairly long line of code in a post, especially if I use the code markup tool, the line seems to overflow beyond the width of the posted message blurb. I'm not suggesting a word-wrap as this could sometimes make the code even more confusing, but how about allowing it to scroll horizontally?

  • Actually I've just added the following to the div tag in the html output from the code markup tool and it seems to work quite well.

    style="overflow: auto; width: 90%;"

    Perhaps this could be added to the code markup tool to include in all posts? Or just in the site CSS file pscode class?

  • You are right it does look really good:
    #long line long line long line long line long line long line long line long line long line long line long line long line long line long line long line long line long line long line long line long line long line 
    ($member | where {$_.name -eq 'nohandle'}).Say('Great tip!')

     

  • One more small addition: style="overflow: auto; width: 90%;padding-bottom:10px;"

    Adds a nice bit of whitespace below the code so it's just a little more aesthetically pleasing than the text being immediately on top of the scroll bar...

  • Very nice. 

    I am still trying to avoid long code though. :)