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

Disambiguate 'target' anchors in slangc reference #6040

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AndrewBrownK
Copy link

There is a misleading/confusing link in the slangc reference when read on GitHub (here).

There are a few different links/anchors identified as "target" (try case insensitive search id="target while editing the file). One of these sections talks about the -target option itself (id="target-1"). Another section talks about other options related to target code generation (id="Target" with capital T). The last lists the specific values that you can feed to the -target option (id="target" with lowercase t).

This might work as intended in some markdown viewers/editors (I don't know). However, GitHub converts the element IDs to lowercase and so two of these links are ambiguous. Thus when reading this documentation and seeking valid options for -target, clicking the link to find those options leads to the wrong section.

In this PR I have changed the title and id of Target to Target Options, so now each target related hyperlink works as intended. This can be tested on my branch here. I cannot attest/confirm that this is bug free in other markdown viewers/editors.

I'm not sure why GitHub is showing this diff is a binary file/change.

@AndrewBrownK AndrewBrownK requested a review from a team as a code owner January 9, 2025 03:25
@CLAassistant
Copy link

CLAassistant commented Jan 9, 2025

CLA assistant check
All committers have signed the CLA.

@AndrewBrownK AndrewBrownK force-pushed the disambiguate-target-anchor branch from 0448a28 to 3ed1267 Compare January 9, 2025 03:34
@csyonghe
Copy link
Collaborator

csyonghe commented Jan 9, 2025

This markdown file is generated by running slangc so we need to fix the docgen logic in the compiler code instead of fixing directly the md file.

Should change source\slang\slang-options.cpp L114.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants