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.

Look in the CODE text for the answer by yonel:

NSArray paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString documentsDirectory = [paths objectAtIndex:0]; NSString* diskCachePath = [NSString stringWithFormat:@"%@/%@", documentsDirectory, @"myCache"];

Trying to reproduce here, but the *'s in the code change the code to be ITALIC instead of showing up as asterisks.

The author of that answer should have indented 4 spaces, but they didn't. They chose to use the <CODE> tag, which doesn't seem to be handled right.

Here is what I see on MAC SAFARI Version 4.0.3 (5531.9) (screenshot): alt text

share|improve this question
    
I am on a MAC/SAFARI. –  jm. Mar 21 '10 at 5:06

3 Answers 3

Oh, you're using the <code> tag directly. As this is a span-level HTML element you can have Markdown inside it; that's part of the Markdown spec.

Basically, don't do that -- see http://meta.stackoverflow.com/editing-help

Either indent by 4 spaces, or use the backtick to indicate code.

share|improve this answer
    
Jeff: I can't control what other people paste in the comment. I'm just pointing out that people aren't doing what you want. Then when, you cut and paste their answer, it has syntax errors because the asterisks are missing. –  jm. Mar 21 '10 at 18:07

I'm no objective-C expert but isn't the asterisk on the first line of code in the wrong place and should be:

NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString* documentsDirectory = [paths objectAtIndex:0]; NSString* diskCachePath = [NSString stringWithFormat:@"%@/%@", documentsDirectory, @"myCache"];

But then I never use the <code> tag anyway.

share|improve this answer
    
It doesn't matter where it is. The usual way of doing it is right in front of the variable name, because then it's clear that int *pointer, value; are variables of two different types. –  Georg Schölly Mar 21 '10 at 11:53
    
@Georg - Gotcha, it was just that the rest of the code in that sample used the asterisk after type convention so why not do the same for NSArray* path and that would have been problem solved re the italics. –  Kev Mar 21 '10 at 20:13

You meant yonel's answer, not CoreyFloyd's, which I've now cleaned up. Those edits were fairly conservative, and—noticing that you have recently earned editing privileges on SO—if you follow that example when/if you edit posts, then you should do fine. Also see a brief editing etiquette overview and code block formatting.

As Jeff pointed out, he was using pre and code tags together, which should be avoided. (I had to keep one because of the code starting with a hyphen after a list would be interpreted as a nested list item otherwise.)

share|improve this answer
    
Well, I was able to edit for 2 days. Now, have to start over. –  jm. Mar 23 '10 at 1:35

You must log in to answer this question.

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