What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

I am using Safari 6 to type code in an answer, and I recently typed this code:

Outfile.printf("FIRSTNAME:"+firstname+"\n"+"LASTNAME:"+lastname+"\n"+"UPDATEDSALARY:%.2f\n"+"\n", updatedsalary);

However in markdown this looked like

enter image description here

That line has 4 spaces at the beginning and it is longer than the text box. If I view the markdown in the edit or compose window, however, instead of seeing four spaces and a bunch of code that is too long for the window and scrolls out of view, I see a blank line and the code on the next line, with the text wrapping at character level. Is this a bug? (I suspect it is, I have never had this problem before, and I remember writing code that is longer than a line.) If so, can it be fixed?

share|improve this question
1  
I think it's fairly standard for a text editor... –  ben is uǝq backwards Nov 18 '13 at 21:50
    
@benisuǝqbackwards I suggest you cast a reopen vote if it isn't a programming question. –  tbodt Nov 18 '13 at 21:52
1  
I already had: meta.stackoverflow.com/posts/207944/revisions, but it would be more polite to let me decide for myself... –  ben is uǝq backwards Nov 18 '13 at 21:54
    
What would the desired behaviour be? The window extending to the right? (Creating a horisontal scroll bar) –  Richard Tingle Nov 18 '13 at 21:55
    
@RichardTingle Yes, the desired behavior would to be to make a horizontal scroll bar. –  tbodt Nov 18 '13 at 22:09
2  
I don't want horizontal scrollbar in the editor textarea. That's not a bug, that's standard behaviour. –  Shadow Wizard Nov 18 '13 at 22:17
    
@RichardTingle That's not how it looked like in my browser. I'll post an updated screenshot. –  tbodt Nov 18 '13 at 22:23
    
@tbodt Ahh, then we really really need to see that, screen shots are essential for this sort of thing –  Richard Tingle Nov 18 '13 at 22:24
    
@RichardTingle Please reconsider your opinion. –  tbodt Nov 18 '13 at 22:25
    
@tbodt My opinion that we need a screen shot? –  Richard Tingle Nov 18 '13 at 22:26
    
@RichardTingle I just posted one. –  tbodt Nov 18 '13 at 22:27
    
For some reason I'm not seeing it, have you edited it into your question? Perhaps a caching problem –  Richard Tingle Nov 18 '13 at 22:28
    
@RichardTingle Yes, I have. Try reloading your page. –  tbodt Nov 18 '13 at 22:29
    
I've cleared my cache on this end and I can't see any revisions past revision 2 (aka mine) so it's not the cache on my end. I guess I'll just have to wait for something to update somewhere to see it –  Richard Tingle Nov 18 '13 at 22:32
    
The new image has finally come through. I see what you mean, no 4 spaces at the beginning. Does it still render correctly? –  Richard Tingle Nov 18 '13 at 22:55

1 Answer 1

Markdown is a form of markup language. It is not a "what you see is what you get" editor. As such it is all just text until it is submitted (after which assorted magic happens and you get the nice output).

As such the behaviour for one "type" of text is the same for all "types" of text. So the question is would we like all paragraphs to be on one incredibly long line with horizontal scroll bar or would we like the occasional overlength code time to have to be split over several lines (but still render correctly).

So this post would look like

enter image description here

I would much rather have nice paragraphs in markdown editing and accept that overlength code lines will have to wrap as the fair price (also overlength lines aren't great and should be discouraged anyway).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .