mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vdoc: fix symbol filtering (#9210)
This commit is contained in:
@@ -292,7 +292,7 @@ fn (mut vd VDoc) generate_docs_from_file() {
|
||||
exit(1)
|
||||
}
|
||||
} else {
|
||||
dcs = doc.generate(dirpath, cfg.pub_only, true) or {
|
||||
dcs = doc.generate(dirpath, cfg.pub_only, true, cfg.symbol_name) or {
|
||||
vd.emit_generate_err(err)
|
||||
exit(1)
|
||||
}
|
||||
@@ -316,13 +316,6 @@ fn (mut vd VDoc) generate_docs_from_file() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if !cfg.is_multi && cfg.symbol_name.len > 0 {
|
||||
if cfg.symbol_name in dcs.contents {
|
||||
for _, c in dcs.contents[cfg.symbol_name].children {
|
||||
dcs.contents[c.name] = c
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
vd.docs << dcs
|
||||
}
|
||||
@@ -449,7 +442,9 @@ fn parse_arguments(args []string) Config {
|
||||
else {
|
||||
if cfg.input_path.len < 1 {
|
||||
cfg.input_path = arg
|
||||
} else {
|
||||
} else if !cfg.is_multi {
|
||||
// Symbol name filtering should not be enabled
|
||||
// in multi-module documentation mode.
|
||||
cfg.symbol_name = arg
|
||||
}
|
||||
if i == args.len - 1 {
|
||||
|
||||
Reference in New Issue
Block a user