microsoft / microsoft/typespec

Doc generation: can't relatively-link to a decorator

Open
#1,713 3 comments 0 reactions 0 assignees View on GitHub
docs
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

If I write a doc comment like this, under the assumption that this comment is rendered to `reference/data-types.md`:

```typespec
/**
* Details applied to a package definition by the [`@package`](./decorators#@TypeSpec.Protobuf.package) decorator.
*/
model PackageDetails {
// ...
}
```

The actual result is that the link is mangled:

image

The (generated) Markdown itself is also mangled:

image

I'm _pretty sure_ that what's happening is that the `@` symbol in the link fragment is being treated as if it were a JSDoc-style tag, and the subsequent contents of the line are removed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.