I need help… I have tried to enter code into a post I put my code in the < code > element. The issue I have is that there is a duplicate block of code tags generated (I think?) so the post looks really ugly and it is hard to see the entire code.
Can anyone help my by letting me know the correct way to add PowerShell code to a post/reply?
I have the same issue so I think it must be a bug with the forums. The workaround I use to make my code look correct is to edit my post immediately after posting it. You evidently have so long to edit a post after submitting it before it’s locked and no changes can be made to it. Saving the post again after selecting edit without having to make any other changes makes my code look correct.
The first post in this thread is an example of the issue I typically have where you end up with more than one block of code and a lot of extra spacing for the same set of code tags in a post.
WordPress natively likes to use the back tick for code, which for us PowerShell people can obviously be a problem. Mike’s right in that editing your post makes it fairly easy to fix. I’ve looked into it a bit, and the code is a bit thornier than I’ve had time to unravel and try to patch.
Ok, thanks for the info.
One idea that might be worth exploring… is to focus our efforst over at StackOverflow and the PowerShell category? The tools at Stackverflow are very easy to work with and there are a lot of people available to help handle the Q&A
Or is this absolutely not something PowerShell.org wish?