nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.57k stars 1.47k forks source link

nim doc does not handle multi-segment module imports #12936

Open fredrikhr opened 4 years ago

fredrikhr commented 4 years ago

Example

file fileToDocument.nim

import folder / module1, folder / module2

Generate documentation: nim doc fileToDocument.nim.

Current Output

The Imports section of the generated HTML documentation lists the imported modules module1 and module2. However, the links link to module1.html and module2.html that are supposed to be located next to the generated HTML documentation.

Expected Output

Since the import path is specified with multiple segments, the multiple segments should be reflected in the text in the generated documentation. Also, the links should preserve the path segements of the import and link to folder/module1.html and folder/module2.html instead.

Additional Information

$ nim -v
Nim Compiler Version 1.0.4 [Windows: amd64]
Compiled at 2019-11-27
Copyright (c) 2006-2019 by Andreas Rumpf

git hash: c8998c498f5e2a0874846eb31309e1d1630faca6
active boot switches: -d:release
Araq commented 4 years ago

Question is whether --project does produce subdirs.

fredrikhr commented 4 years ago

@Araq it does indeed.