Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 153 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Possible Duplicate:
Code block is not properly formatted when placed immediately after a list item

I tried the following post:

My application allows the user to take a picture in the camera/or choose from his photo library.

I would like the posted image to be in resolution 650X550

However I see:

  1. After this code the size is 320X480

    • (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo { NSLog(@"The height is %f",image.size.height); }
  2. When I submit the image like this - I retrieve it in 1024X480

    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://myurl/upload/"] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60];

The question couldn't be formatted with code blocks. Only when I removed the numbers (1,2) I could format it.

I think that it's a bug

share|improve this question

marked as duplicate by Martijn Pieters, ben is uǝq backwards, Bo Persson, Time Traveling Bobby, hims056 Dec 10 '12 at 10:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 2 down vote accepted

In bullet points, you need to indent code blocks with 8 spaces:

  1. After this code the size is 320X480

    - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo
        {
            NSLog(@"The height is %f",image.size.height);
        }
    
  2. When I submit the image like this - I retrieve it in 1024X480

    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://myurl/upload/"]
    cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60];
    

This is not a bug, this is how markdown works.

share|improve this answer
    
Well, the 1 and 2 are not part of the code! each one has to be formatted separately – Dejel Dec 10 '12 at 9:44
1  
To make a code block, you need to indent from the current indentation level. Having a list creates a new indentation level - hence, you need to indent another four spaces from that level. – J. Steen Dec 10 '12 at 9:46
    
If my question is duplicated - so maybe delete it no? – Dejel Dec 10 '12 at 9:47
    
@Odelya: What makes you think that in my post the number bullets are part of the code? – Martijn Pieters Dec 10 '12 at 9:47
    
@Odelya: No need to delete. It'll be closed when enough votes have been accumulated and then will serve to help others find the original post. – Martijn Pieters Dec 10 '12 at 9:47
    
You are right. It's not part of the code - it looked to me at the beginning since you put it with the grey background – Dejel Dec 10 '12 at 9:56

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