4

A lot of the new documentation commands for XCode has been discussed here, but even with the commands explained there, I can't seem to find a way to make a command span multiple words.

Let me give an example:

Input: Hi, I am for @a cosmetic purposes only.

Output: Hi, I am for cosmetic purposes only.

Nothing wrong there, but imagine me wanting to make the word purposes italic as well. There the problem starts. I tried:

Input: Hi, I am for @a cosmetic @a purposes only.

Output: Hi, I am for cosmeticpurposes only.

--

Input: Hi, I am for @a cosmetic <any amount of spaces> @a purposes only.

Output: Hi, I am for cosmeticpurposes only.

--

Input: Hi, I am for @a cosmetic @a @a purposes only.

Output: Hi, I am for cosmeticpurposes only.

--

Input: Hi, I am for @a cosmetic @a @a @a purposes only.

Output: Hi, I am for cosmeticpurposes only.

--

Input: Hi, I am for @a cosmetic <line break> @a purposes only.

Output: Hi, I am for cosmeticpurposes only.

--

As you can see, I can't seem to find a way to do it. Somehow all whitespaces seem to get trimmed. Does anyone knows a solution to this one?

Community
  • 1
  • 1
Gerald Eersteling
  • 1,244
  • 14
  • 28

2 Answers2

4

I'm not sure if you already knew this or not but the following works for XCode 6:

Italic:

Hi, I am for <em>cosmetic purposes</em> only.

Bold:

Hi I am for <b>cosmetic purposes</b> only.

I am currently looking for a solution to @c, couldn't find one yet.

Edit: Oh well, <code>...</code> works for @c.

mostruash
  • 4,169
  • 1
  • 23
  • 40
  • Yeah, I just tried a lot of HTML..indeed surprising how that just works. Makes documenting your code that much better! – Gerald Eersteling Feb 22 '15 at 14:01
  • `` works in the way that if underlines and colours it like a link but it doesn't open the url :(. Maybe could someone tweak it to make it work, or even better, to redirect to another method like Apple own documentation does. – Iulian Onofrei Mar 31 '15 at 13:56
  • I guess you can make it work using a `href` attribute but you need to generate a docset to be able to follow links as you do in Apple's docs. – mostruash Mar 31 '15 at 14:55