Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jazzy requires newlines in Swift doc comments where Swift/Xcode doesn't #546

Closed
lilyball opened this issue Apr 29, 2016 · 6 comments
Closed
Labels

Comments

@lilyball
Copy link

lilyball commented Apr 29, 2016

Jazzy isn't interpreting Swift doc comment directives the same way Xcode does. In particular, Jazzy seems to require a blank line before directives where Xcode doesn't.

For example, with the following declaration:

/// The default `HTTPManager` instance.
/// - SeeAlso: `HTTPManagerConfigurable`.
public let HTTP = HTTPManager(shared: true)

Xcode handles this properly:

screen shot 2016-04-29 at 11 25 05 am

But Jazzy doesn't:

screen shot 2016-04-29 at 11 25 23 am

jazzy version: 0.6.0

@lilyball
Copy link
Author

I also see this occur with - Parameter and - Note directives, and I assume it occurs with every directive.

@jpsim jpsim added the bug label Apr 29, 2016
@jpsim
Copy link
Collaborator

jpsim commented Apr 29, 2016

Thanks for reporting... this has been brought up before and my reaction then was to close it but now I'm thinking it'd be best to mirror Xcode's semantics.

The reason for this discrepancy is that jazzy (well really redcarpet) requires strict Markdown syntax, whereas Xcode doesn't.

However, I really think the best move here would be to move to using Apple's fork of CommonMark that's used to generate QuickHelp docs to match Xcode's behavior exactly.

@lilyball
Copy link
Author

Sounds like a good idea. I definitely think Jazzy should match the parsing of Xcode, because people writing documentation comments will likely be using Xcode for them and will expect Jazzy to match. Using the actual implementation Xcode uses sounds like a good way to get this behavior.

@karapigeon karapigeon self-assigned this Nov 23, 2016
@karapigeon
Copy link
Contributor

I definitely agree with @kballard on this. Has any progress been made?

@jpsim
Copy link
Collaborator

jpsim commented Nov 26, 2016

There's no doubt about it, if Xcode supports a doc format, we should strive to support it too.

Moving the implementation to CommonMark is still a major project though, and would probably incur some regressions, given that redcarpet supports certain useful non-standard Markdown features that our users rely on, like mixed HTML/Markdown.

@johnfairh
Copy link
Collaborator

This has been fixed in master for a while now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

4 participants