Open MrGVSV opened 7 months ago
This is magic. I can't believe you actually did this
I put it behind a default
render
feature in case anyone using this crate locally wants to opt-out of this behavior.
Good idea! Although I would probably name the feature another way, render
sounds too generic. What about preview-icons
?
I put it behind a default
render
feature in case anyone using this crate locally wants to opt-out of this behavior.Good idea! Although I would probably name the feature another way,
render
sounds too generic. What aboutpreview-icons
?
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 https://github.com/rust-lang/rust/issues/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
[^1]: 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.