Aliases now rendered in docs

This commit is contained in:
Chadtech 2021-03-30 00:52:47 -04:00
parent 1320930a73
commit 1df89ccbbe
3 changed files with 15 additions and 4 deletions

View file

@ -111,12 +111,16 @@ fn generate_module_doc<'a>(
},
Alias {
name: _,
name,
vars: _,
ann: _,
} =>
// TODO
{
} => {
let entry = DocEntry {
name: name.value.to_string(),
docs: before_comments_or_new_lines.and_then(comments_or_new_lines_to_docs),
};
acc.push(entry);
(acc, None)
}

View file

@ -2,6 +2,9 @@ interface Test
exposes [ singleline, multiline, multiparagraph, codeblock ]
imports []
## This is a block
Block : [ @Block ]
## Single line documentation.
singleline : Bool -> Bool

View file

@ -20,6 +20,10 @@ mod test_docs {
};
let expected_entries = vec![
ModuleEntry {
name: "Block".to_string(),
docs: "<p>This is a block</p>\n".to_string(),
},
ModuleEntry {
name: "singleline".to_string(),
docs: "<p>Single line documentation.</p>\n".to_string(),