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

Ensure that the member type icon is correct #115

Merged
merged 4 commits into from
May 19, 2020

Conversation

samsymons
Copy link
Contributor

This PR fixes an issue where the type icon being emitted in certain situations was incorrect.

Admittedly I was slightly dreading tracking this one down, but the fix was fortunately simple: the parent symbol for the member was being used to generate the icon, rather than the member itself.

Here's the generated pages for enums and typealiases after the change (embedded in collapsible sections to keep things tidy):

Enum enum
Typealias typealias

Fixes #64.

This was using the `symbol` property, which will use the type of the member’s related type. Instead, it should use the member being iterated over.
Copy link
Contributor

@mattt mattt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, as simple as that, huh? Thanks for catching this and providing the patch. Glad to see this wasn't a more involved fix.

@mattt mattt merged commit b3a01da into SwiftDocOrg:master May 19, 2020
@mattt
Copy link
Contributor

mattt commented May 19, 2020

Thanks for your help on these visual bugs, @samsymons. I'm in the process of cutting a new release now. Really glad to have these squashed for 1.0.0-beta.3!

@samsymons
Copy link
Contributor Author

@mattt No problem! Thank you for the fantastic tool 😄

@samsymons samsymons deleted the member-type-icon-fix branch May 19, 2020 13:46
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.

Incorrect icon for Typealias declaration in HTML
2 participants