-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render icon previews in doc comments #46
base: main
Are you sure you want to change the base?
Conversation
This is magic. I can't believe you actually did this |
Good idea! Although I would probably name the feature another way, |
Yeah that's probably a better name. I'll update it! |
Sorry for the delay! I updated the feature name :) |
Hold on a second, having a crate feature doesn't make sense because it's in the codegen crate, which is not used by the users, hence it's kinda pointless. I'd say we remove it and just ship the preview icons always |
It would be cool if we could have conditional docs but we can't due to rust-lang/rust#1998 |
Adds the ability to have icons rendered in the doc comments of their respective type.
I put it behind a default
render
feature in case anyone using this crate locally wants to opt-out of this behavior. But if it's better to not be a default feature or not be a feature at all, please let me know and I can change it!Screenshots
Footnotes
Definitely not the prettiest, however, I'm not sure there's a good way of swapping the color based on the theme. And we can't just add a stroke as some icons are purely stroke. ↩