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

fix: GitHub changed markdown rendering for headings/anchors #3548

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

handrews
Copy link
Member

@handrews handrews commented Feb 2, 2024

This is a rebase/re-submit of @MikeRalphson's exact commit from PR #3408 as he is not currently available to rebase it (the markdown checks were broken at that point on main- they should be fixed now).

Here is that PR's text:


Closes #3207 #3160 #3136 #3128 #3029 #3197 #3132

This PR mechanically corrects for the change made by GitHub to its markdown renderer which no longer honours the mixed markdown/html form:

### <a name="myAnchor"></a> My Anchor

(the use of name or id makes no difference), and only links to the implicit anchor #my-anchor now work.

This PR affects the main branch, so published versions of the OAS only. If merged, follow-up PRs will be raised for in-flight -dev branch versions.

An example of the result of this PR can be previewed here. [Note: points to @handrews's fork because of the re-submit]

@handrews
Copy link
Member Author

handrews commented Feb 8, 2024

So, what's going on here is this (all done by a script written by Mike Ralphson):

  • camelCase anchors that were created within section headings, like name="pathItemObject", no longer work, so:
    • they have been removed from the headings
    • uses have been converted e.g. from href="#pathItemObject" to href="#path-item-object"
  • anchors that are declared as camelCase outside of headings, like name="dialectSchemaId", still work with href="#dialectSchemaId" and are left alone

You can see the rendered result at https://github.com/handrews/OpenAPI-Specification/tree/anchor-fixes/versions

I've skimmed through these and it looks like the updates are correct. I skimmed slowly enough for 3.1.1 that I am fairly sure nothing else was touched (except trimming a bit of trailing whitespace on some lines, which is fine).

@darrelmiller darrelmiller merged commit 7cc8f4c into OAI:main Feb 13, 2024
2 checks passed
@handrews handrews deleted the anchor-fixes branch March 5, 2024 21:40
handrews added a commit to handrews/OpenAPI-Specification that referenced this pull request Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants