swift-doc
swift-doc copied to clipboard
Refactor and optimize HTML generation
Here be dragons 🐲
In an effort to get everything out the door, I kind of took a "whatever works" approach to development. To that end, HyperTextLiteral was great for getting out of the way. But it's obvious that we're leaving a lot of performance wins on the table with our current implementation.
https://github.com/SwiftDocOrg/swift-doc/blob/70f8e59d503f01494570ef83ced1fbeca98968d0/Sources/swift-doc/Supporting%20Types/Components/Documentation.swift#L102-L126
Once the design stabilizes, it'd be nice to take another pass over all of this to clean and speed things up.
Sub-Tasks
- [ ] Extract repeated markup patterns into components (e.g. definition lists of symbols)
- [ ] Create helper functions for things like string parameterization (`"Foo Bar" -> "foo-bar")