SwiftDocOrg / swift-doc

A documentation generator for Swift projects
https://swiftdoc.org
MIT License
1.68k stars 99 forks source link

Bullet point lists are not rendered in docs #128

Closed mbrandonw closed 4 years ago

mbrandonw commented 4 years ago

We just started preparing to use swift-doc in our Composable Architecture repo, and so far it's looking really nice! We've found a couple of small bugs that we wanted to bring to your attention. I haven't seen this one reported yet.

The docs generated for this:

https://github.com/pointfreeco/swift-composable-architecture/blob/28c65dfa60ac8640b1d893746d8525213a054877/Sources/ComposableArchitecture/SwiftUI/WithViewStore.swift#L7-L18

looks like this:

https://github.com/pointfreeco/swift-composable-architecture/blob/28c65dfa60ac8640b1d893746d8525213a054877/Documentation/ComposableArchitecture/WithViewStore/index.html#L47-L50

In particular, the bullet points have been removed.

mattt commented 4 years ago

Thanks for pointing this out, @mbrandonw! I know exactly what the problem is.

In the parser for SwiftMarkup, we walk bulleted list items to check for callouts like Important or Parameters. If no callout delimiters are found, the text gets returned, but minus the original *:

https://github.com/SwiftDocOrg/SwiftMarkup/blob/f395f3bd9e345402cc744aa9051780ed403d3b26/Sources/SwiftMarkup/Documentation.swift#L150

I should have a fix for that in swift-doc on master later today for you to use.

mbrandonw commented 4 years ago

Awesome! Thanks @mattt.

Interested to see the fix! We're interested in learning more of the code so that we can help out.

mattt commented 4 years ago

@mbrandonw Alright, I just opened #130, which I believe should resolve this. I'll have time to verify this in a few days, but you're more than welcome to test this out for yourself locally.

mbrandonw commented 4 years ago

Beautiful, pulled down that branch and ran TCA through and it works!

https://github.com/pointfreeco/swift-composable-architecture/commit/1ded20b30025940215eeee1d2c4aa0b4e830e30c#diff-01f64672d601c10fb38c79f3598541b7R50-R64

image