Show definition for type defs
As in the previous commit, we have to use the selector "pre.typedef" instead of ".docblock.type-decl" to select the definition for type defs.
This commit is contained in:
parent
f0245bada3
commit
cbc4965902
@ -12,7 +12,7 @@ SPDX-License-Identifier: MIT
|
||||
- Improve the documentation parser:
|
||||
- Fix the definition of methods to only contain the actual definition.
|
||||
- Remove spurious members in module documentation.
|
||||
- Show the definition for constants.
|
||||
- Show the definition for constants and typedefs.
|
||||
|
||||
## v0.1.2 (2020-07-25)
|
||||
|
||||
|
@ -132,6 +132,7 @@ pub fn parse_item_doc(item: &doc::Item) -> anyhow::Result<doc::Doc> {
|
||||
let definition_selector = match item.ty {
|
||||
doc::ItemType::Constant => "pre.const",
|
||||
doc::ItemType::Function => "pre.fn",
|
||||
doc::ItemType::Typedef => "pre.typedef",
|
||||
_ => ".docblock.type-decl",
|
||||
};
|
||||
let definition = select_first(&document, definition_selector)?;
|
||||
|
Loading…
Reference in New Issue
Block a user