-
Notifications
You must be signed in to change notification settings - Fork 701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
References are marked as external when the path includes a dot #1049
Comments
Huh, well that's unexpected, I'll have to find some time to look at the internal/external distinction to figure out what's going on someday.. Related: #927 |
I've traced the issue to lib/converter/types/alias.ts: let symbolName = checker.getFullyQualifiedName(type.symbol).split('.');
if (!symbolName.length) {
return false;
}
if (symbolName[0].substr(0, 1) === '"') {
symbolName.shift();
} Here the [ '"/private/tmp/typedoc/examples/basic',
'dot/src/classes"',
'INameInterface' ] The path seems to be enclosed in quotes so we can remove it with a Regex (yay, we have two problems now!): const checker = context.checker;
const fqn = checker.getFullyQualifiedName(type.symbol);
let symbolName = fqn.replace(/"[^"]*"\./, '').split('.');
if (!symbolName.length) {
return false;
} Does this seem reasonable? I've submitted the patch in #1052 for review. |
* fix: references marked as external if path has dots Closes #1049 * refactor: ignore quotes in path * Remove quotes from path since it breaks on Windows
Expected Behavior
A dot (".") in the project path should have no effect on the generated documentation.
Actual Behavior
References such as
classes.INameInterface
are treated as external when the project path contains a dot.Steps to reproduce the bug
examples/basic
toexamples/basic.dot
run
script in the folderINameInterface
is no longer an internal reference injson.json
(sample):Normally it would be (sample):
Environment
The text was updated successfully, but these errors were encountered: