-
Notifications
You must be signed in to change notification settings - Fork 68
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
calc path in title next to anchorID #350
Conversation
Fixes hashicorp#285 Signed-off-by: Sebastian Hoß <[email protected]>
Rebased on latest main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sebhoss
Thank you for taking the time to look into to this! The code in the schemamd
package is a bit convoluted but I think you're probably right that this likely caused by Go looping mechanics.
I've added an acceptance test and a changelog entry, but otherwise the PR looks good to me. Thanks again!
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
So I cannot quite explain it but this change fixes wrong path expressions in titles. I am guessing that Go's weird loop/pointer mechanics are at play here, but I failed to figure out where/why/how this is happening in this case.
Since the calculated anchorID is always correct, I've simply moved the calculation of the path title right next to it and everything immediately worked as expected.
As you can see in the testdata change, this bug has been around for a while and probably affects many providers in the ecosystem.
Fixes #285