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

Python depends on formatting (new lines and indentation); it's part of the language.

However, the code markup in the editor messes with the formatting, sometimes incorrectly displaying multiline blocks.

Is there anything that can be done to fix this?

UPDATE

OK, so it looks like this is only occuring on my phone. As an example, try looking at this question on your phone (I'm on an iphone).

share|improve this question
6  
Can you please include an example? –  Asad Feb 12 '13 at 17:18
4  
If you are copying and pasting code with tabs in it, the editor will mess that up yes. You should convert those tabs to use only spaces.. –  Martijn Pieters Feb 12 '13 at 17:19
    
Note that the majority of python question askers manage to post code samples just fine. –  Martijn Pieters Feb 12 '13 at 17:21
    
@MartijnPieters Don't tabs automatically get converted to 4 spaces? –  Asad Feb 12 '13 at 17:25
    
@Asad The markdown source itself isn't changed and will continue to contain tabs, but the rendered version (both in the preview and in the version that eventually is rendered to the page) will have their tabs converted to align on four space-boundaries. –  balpha Feb 12 '13 at 17:28
    
We really need an example of what you mean -- I don't understand what issue you're describing here. –  balpha Feb 12 '13 at 17:30
    
@Asad: Things are complicated some more by the editor; if you paste tabs, the 'source code' button can actually remove initial tabs instead of add them. And if you mix tabs and spaces (4 space indents with 8-space tabs, etc) things get messy fast. –  Martijn Pieters Feb 12 '13 at 17:32
1  
I'd be too busy demanding Python be fixed to come here. Whitespace delimiters? Eugh. –  Won't Feb 12 '13 at 17:37
    
Just to check, you did review How do I format my code blocks? right? –  Martijn Pieters Feb 12 '13 at 17:38
2  
@Won't: You, me, outside. Let's have a 'discussion' about that. –  Martijn Pieters Feb 12 '13 at 17:39
    
@MartijnPieters: Somehow, I don't think that would be constructive.. –  Won't Feb 12 '13 at 18:38
    
@Won't: Just watch me go constructive on your nose! :-P –  Martijn Pieters Feb 12 '13 at 18:39
1  
The discussion is likely to lead to a great deal of (facial) re-construction –  Asad Feb 12 '13 at 18:50
    
@MartinPieters I guess that proves that the majority of posters aren't posting from the loo. –  Aidan Ewen Feb 12 '13 at 18:51
1  
@Aidan Ewen: Please tell me that isn't in reference to this question from earlier today. –  BoltClock's a Unicorn Feb 12 '13 at 18:56

1 Answer 1

It is not just python that has formatting messed up, although not all languages rely on whitespaces to convey actions.

Example with tabbing vs spaces: http://stackoverflow.com/review/suggested-edits/1506555

that link was originally formatted with tabs, which was edited to display with spaces. With a language that relies on formatting to conver meaning, it could potentially change the coding commands.

share|improve this answer

You must log in to answer this question.

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