mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vdoc: fix markdown and plaintext rendering (#6882)
This commit is contained in:
@@ -296,6 +296,9 @@ pub fn (mut d Doc) file_ast(file_ast ast.File) map[string]DocNode {
|
||||
}
|
||||
}
|
||||
d.fmt.mod2alias = map[string]string{}
|
||||
if contents[''].kind != .const_group {
|
||||
contents.delete('')
|
||||
}
|
||||
return contents
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,6 @@ fn test_generate_from_mod() {
|
||||
}
|
||||
assert nested_mod_doc.head.name == nested_mod_name
|
||||
assert nested_mod_doc.head.content == 'module $nested_mod_name'
|
||||
assert nested_mod_doc.contents.len == 4
|
||||
assert nested_mod_doc.contents.len == 3
|
||||
assert nested_mod_doc.contents['ChunkScanner'].children.len == 3
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user