-3

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

0

1 Answer 1

2

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.

6
  • Well, the 1 and 2 are not part of the code! each one has to be formatted separately
    – Dejel
    Commented Dec 10, 2012 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
    Commented Dec 10, 2012 at 9:46
  • If my question is duplicated - so maybe delete it no?
    – Dejel
    Commented Dec 10, 2012 at 9:47
  • @Odelya: What makes you think that in my post the number bullets are part of the code? Commented Dec 10, 2012 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. Commented Dec 10, 2012 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
    Commented Dec 10, 2012 at 9:56

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