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

vdoc: include the project root folder, when searching for readme of src/ (#19000)

This commit is contained in:
Turiiya
2023-07-29 23:00:18 +02:00
committed by GitHub
parent 1c2b4e76dc
commit e78e468d5f
7 changed files with 19 additions and 0 deletions

View File

@@ -233,6 +233,9 @@ fn (vd VDoc) get_readme(path string) string {
}
}
if fname == '' {
if path.all_after_last(os.path_separator) == 'src' {
return vd.get_readme(path.all_before_last(os.path_separator))
}
return ''
}
readme_path := os.join_path(path, '${fname}.md')