Xcode "Re-Indent" function breaks formatting inside Quick Help symbol markup

Originator:m
Number:rdar://39258890 Date Originated:7 April 2018
Status:Open Resolved:
Product:Xcode Product Version:9.3
Classification:Suggestion Reproducible:Always
 
Area:
Xcode

# Summary

Indentation required by Quick Help markup is removed by Xcode's "Re-Indent" function.

# Detail
I often try to document Swift functions, so they appear in Xcode "Quick Help", but it requires careful indentation of parameter names. This indentation is removed if I use Xcode's "Re-Indent" feature to reformat my Swift code.

I'm using your markup documentation as guidance:
https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/SymbolDocumentation.html

# Steps to reproduce

1. Write "Quick Help" documentation for a Swift function with parameters
2. Option-Click on the function, observe that the parameters are shown correctly in Quick Help (See attached file "correct-before-reindent.png")
3. Select all and "Re-Indent" the source file
4. Option-Click on the function, observe that parameters are now not shown correctly (See attached file "incorrect-after-reindent.png")

# Expected behaviour

"Re-Indent" should not clobber indentation inside a /** */ comment block.

# Actual behaviour

"Re-Indent" re-indents the whole file, breaking Quick Help documentation.

# Reproducibility

Always

# Sample code

https://gist.github.com/mflint/b480f9daae9a10d1b2ea0237d2d7b8c6

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!