Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Formatting tables in Swift documentation comments

Tags:

xcode

swift

I have a section of code like this sitting above my computed property:

 /**     
 Data Types Conversions:
 -----------------------
 +-----------------+-------------+
 | kernel          | Swift/Obj-c |
 +=================+=============+
 | sampler         | CISampler   |
 | __table sampler | CISampler   |
 | __color         | CIColor     |
 | float           | NSNumber    |
 | vec2/3/4        | CIVector    |
 +-----------------+-------------+
 */

When it is rendered in the formatted comments pop-up I see garbled text.

Is there a way to represent this data in a table that actually renders when you option-click on the associated computed property?

like image 889
Kyle Strader Avatar asked Oct 30 '22 14:10

Kyle Strader


1 Answers

I solved this problem with a code indent.

enter image description here

like image 66
ChaosSpeeder Avatar answered Nov 15 '22 07:11

ChaosSpeeder