slint-ui / document-features

Extract documentation for the feature flags from comments in Cargo.toml
Apache License 2.0
173 stars 13 forks source link

Please remove empty lines between features #17

Closed msrd0 closed 1 year ago

msrd0 commented 1 year ago

When I run cargo expand, this is the generated output from the macro:

* **`openapi`** —  Add `OpenapiType` implementations for `AATreeSet` and `AATreeMap`.

* **`serde`** —  Add `(De)Serialize` implementations for `AATreeSet` and `AATreeMap`.

Unfortunately, this triggers some markdown renderers (including pulldown-cmark and grip) to view them as two separate lists with one item each, which means they are rendered with too much spacing between the two features. If you removed the empty line, they would be treated as one list with two items, and be rendered with less space, just like rustdoc.

ogoffart commented 1 year ago

I wonder if the change would break existing crate and not look good on docs.rs if the documentation uses newlines or paragraph within their feature docs.

I made a quick try and it seems to work alright. So I guess we can make the change without breaking compatibility.