Xcode: Documentation comments with links containing ampersands are not rendered
| Originator: | rix.rob | ||
| Number: | rdar://23394719 | Date Originated: | 04-Nov-2015 12:33 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 7.1 (7B91b) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
I want to link the documentation for a type to Hinze & Jeuring’s paper Weaving a Web:
http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=6BA5A34F36ED218B2A928CFA7D22BCCC?doi=10.1.1.19.445&rep=rep1&type=pdf
However, this URL causes Xcode to fail to display the documentation when option-clicking the type’s name.
Steps to Reproduce:
1. In some indexed Xcode project, add a documentation comment to some symbol, like so:
/// test
func f() {}
Option-click the documented symbol and verify that it is showing “Description: …” with the documentation you added.
3. Add a link which contains an ampersand to the documentation comment using Markdown syntax, either inline or with the footnote link syntax. Here I’m adding it inline:
/// test [a link](http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=6BA5A34F36ED218B2A928CFA7D22BCCC?doi=10.1.1.19.445&rep=rep1&type=pdf)
func f() {}
4. Option-click the documented symbol.
Expected Results:
I expected the resulting popup to show the function’s type & rendered documentation comments. If it was unable to parse the link, I would further expect it to degrade gracefully, showing as much of the documentation as it was able to render, rather than omitting all of it.
Actual Results:
It shows the type only, and completely omits the comments.
Regression:
- It’s fine if you remove the ampersands (but that breaks the URL).
- It’s fine if you use a URL minifier that doesn’t use ampersands (but then you have to trust that the minifier will continue existing & not break your URLs).
Notes:
I’ve attached a project which repros the issue.
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!