1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

docs: show the full information for deprecated functions

This commit is contained in:
Delyan Angelov
2022-03-29 15:17:55 +03:00
parent fd34ebd84e
commit 7ee93c8a20
2 changed files with 25 additions and 13 deletions

View File

@@ -260,7 +260,11 @@ pub fn (mut d Doc) stmt(stmt ast.Stmt, filename string) ?DocNode {
}
ast.FnDecl {
if stmt.is_deprecated {
node.tags << 'deprecated'
for sa in stmt.attrs {
if sa.name.starts_with('deprecated') {
node.tags << sa.str()
}
}
}
if stmt.is_unsafe {
node.tags << 'unsafe'