mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
docs, cmd: fix broken docs source links regression in vdoc
(#23889)
This commit is contained in:
parent
aebe9bc1c8
commit
81afd8f502
1 changed files with 7 additions and 1 deletions
|
@ -303,12 +303,18 @@ fn (mut vd VDoc) generate_docs_from_file() {
|
|||
} else {
|
||||
os.dir(cfg.input_path)
|
||||
}
|
||||
manifest_path := os.join_path(dir_path, 'v.mod')
|
||||
manifest_path := if cfg.is_vlib {
|
||||
os.join_path(vroot, 'v.mod')
|
||||
} else {
|
||||
os.join_path(dir_path, 'v.mod')
|
||||
}
|
||||
if os.exists(manifest_path) {
|
||||
vd.vprintln('Reading v.mod info from ${manifest_path}')
|
||||
if manifest := vmod.from_file(manifest_path) {
|
||||
vd.manifest = manifest
|
||||
}
|
||||
} else if cfg.is_vlib {
|
||||
assert false, 'vdoc: manifest does not exist for vlib'
|
||||
}
|
||||
if cfg.include_readme || cfg.is_vlib {
|
||||
mut readme_name := 'README'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue