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

[Proposal]: allow 'href' attributes (particularly in <see> and <seealso> elements) #8979

Open
DustinCampbell opened this issue Jan 6, 2025 · 0 comments
Assignees
Milestone

Comments

@DustinCampbell
Copy link
Member

Summary

Motivation

Currently, the C# language does not provide clear facilities for referencing external content addressable by a URI. This leads to confusion among developers regarding the best plan to include such content in documentation:

Detailed design

This proposal involves three components, each of which should be formalized for inclusion in the language specification.

  • The href attribute of documentation comment elements is defined, with the value as a URI. The compiler MAY report a warning if the value is not a valid URI.

  • The see and seealso elements are updated to allow for the use of href attribute. The compiler MAY report a warning if both the cref and href attributes are used for the same reference. The following shows examples of how this may appear:

    <see href="https://github.com/dotnet/csharplang/"/>
    <see href="https://github.com/dotnet/csharplang/">The official repo for the design of the C# programming language</see>
  • The see and seealso elements are updated to indicate the content of the element, if provided, should be used as the display text of the reference.

This change is likely to not require any core changes in the behavior of the compiler. However, tools (including the IDE component of dotnet/roslyn) are likely to require updates to ensure correct presentation of these references.

@DustinCampbell DustinCampbell self-assigned this Jan 6, 2025
@dotnet dotnet locked and limited conversation to collaborators Jan 6, 2025
@DustinCampbell DustinCampbell added this to the Backlog milestone Jan 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant