Skip to content
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

Shorthand for internal links #11

Open
that-hatter opened this issue Jan 27, 2024 · 1 comment
Open

Shorthand for internal links #11

that-hatter opened this issue Jan 27, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@that-hatter
Copy link
Member

that-hatter commented Jan 27, 2024

Currently, linking to other entries involves writing out their relative link. A shorthand might be preferred.
Some possible ways would be:

  • prefixing them with some seldom used character like $
  • assuming all text inside inline code that matches an api entry's name is referring to that api entry

Both these approaches will need to consider cases where a name matches two entries, such as $Card matching both the Card type entry and Card namespace entry.

Linking to a specific overload of a function/function type is also currently not possible but could be supported either by adding a name field to overloads or indexing overloads by number.

@that-hatter that-hatter added the enhancement New feature or request label Mar 31, 2024
@that-hatter
Copy link
Member Author

that-hatter commented Apr 2, 2024

I'm considering going with the second idea, but adding bold text to refer to non-code entries.
Essentially, if a text is an InlineCode and it matches a namespace, function, or constant's name, it's assumed to be referring to that namespace/function/constant entry.
Meanwhile if it is a BoldText and it matches a type, enum, or tag's name, it's assumed to be referring to that type/enum/tag.

This naturally differentiates Card (the namespace) and Card (the type).
This means for the specs, there should be no duplicate names among functions, constants, and namespaces. Likewise among types, enums, and tags.

@ProjectIgnis ProjectIgnis deleted a comment from feeshstick Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant