swiftlang / swift-docc-render

Web renderer for Swift-DocC documentation.
Apache License 2.0
315 stars 53 forks source link

[Rebased] Highlight unique components of overloaded declarations [alternate approach] #875

Closed hqhhuang closed 5 months ago

hqhhuang commented 5 months ago

https://github.com/apple/swift-docc-render/pull/847 rebased onto main. Issue: rdar://117503463

This implements the same rendering of highlighted tokens as #841 but using an alternate Render JSON schema where each token may possibly have a highlightDiff boolean flag instead of introducing a new token kind to represent highlights.

I'm not sure yet which approach the DocC team is going to decide on yet, so I'm opening a draft PR for both options and will close one depending on what they decide on.

Testing

Same instructions as #841 except make sure to use the older commit 33388c3c7987904e0aec58e4035fea14bcd19965 from the swift-docc branch when building DocC instead of the latest commit from the mentioned branch.

hqhhuang commented 5 months ago

@swift-ci test