|
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..... for(int i=0;i
UPDATE: Used the markdown manually and same effect....gets cut off...
(comments are locked)
|
|
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. yeah i did that...im not that clueless....it doesnt work thats why im posting about it
Aug 07 '12 at 10:11 PM
mononull
It always works pretty well as long as you don't forget any of the two points. It even works here in comments. There is no button, but you can still indent it manually like this: The first 4 spaces will not be shown in your code block. They are used to recognise code. Each other character will be displayed as it is:
Aug 07 '12 at 11:09 PM
Bunny83
(comments are locked)
|
|
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). i tried and
Aug 08 '12 at 03:23 PM
mononull
seem to work fine on that last comment though....okaaay
Aug 08 '12 at 03:23 PM
mononull
That's how the text looks for me while editing: <pre>
var someVar: boolean;
function Update(){
someVar = !someVar;
}
The pre tag keeps the code exactly like you write or paste, except for the damned < character, which needs a blank after it in order to not be considered a tag.
Aug 09 '12 at 12:56 AM
aldonaletto
(comments are locked)
|

Your first for-loop is just indented by 1 space... 1 space is not 4.
I'd suggest trying a different web browser. I've never seen the code button not work personally, but to be fair the code parsing on this site is kinda messed up and has been for a while.