Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Conversation

@domcorvasce
Copy link
Contributor

@domcorvasce domcorvasce commented Aug 22, 2020

Resolves #170

It's my first time diving into SwiftDoc codebase. Excuse me if I say something wrong.

The code which list parameters is atswift-doc/Supporting Types/Components/Documentation.swift:52.

List(of:  documentation.parameters) { parameter in
    Fragment { "\(parameter.name): \(parameter.description)" }
}

Parameter#description returns a string representation of the object, which includes the name and -.
I didn't look further into it, but obviously we were repeating the parameter name and adding an additional dash.

In the end, I replaced parameter.description with parameter.content (thanks to Documentation.swift:122).
It works now.

@mattt
Copy link
Contributor

mattt commented Aug 22, 2020

Great work, @domcorvasce! I fixed this for HTML with #156, but neglected to make the corresponding fix for CommonMark. Thanks for your help with this — I really appreciate it!

@mattt mattt merged commit 7b37a91 into SwiftDocOrg:master Aug 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Function parameter is not rendered correctly in CommonMark

2 participants