I'm trying to post some example code, but every time I try the text gets cut off. I can paste regular sentences fine. But whenever I copy and paste my code example....it will show up in the preview window fine....but then after clicking save it all gets cut off at the '<' expression. I paste the code, select all the code text, click the code sample button, and this doesn't work either. Same effect where everything gets cut off.....
UPDATE: Used the markdown manually and same effect....gets cut off...
That's because you didn't marked your code as code. Just highlight all text that is code and press the "101 010" button above the edit field.
This button just do this:
Just click the "?" at the right side of the editor which shows the basic markdown. At the end of that page there's a like to a more detailed documentation. Alternatively you can also take a look at the documentation of the StackOverflow which is quite similar to the markdown used here on UA.
As final note: don't try to put a code block right below a bullet-list. It won't work ;) instert at least one normal line in between.
answered Aug 07 '12 at 10:08 PM
This is happening because this site "thinks" that a < signal followed by any character but a space is a tag, and swallows the whole text after it until a > signal closes the imaginary tag. Place a blank space after < and the code will magically reappear (unless there's another < in your text).
answered Aug 08 '12 at 12:19 AM