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 table of contents generation for release notes #1000

Merged
merged 6 commits into from
Dec 22, 2024

Conversation

sholderbach
Copy link
Member

@sholderbach sholderbach commented Dec 22, 2024

  • fixed typo: table-of-content in the backreference
  • missing sanitization of _,+,.,?
  • handling the confusion of h1 # and comment #

- [x] fixed typo: `table-of-content` in the backreference
- [x] missing sanitization of `_`,`+`,`.`,`?`
- [ ] handling the confusion of h1 `#` and comment `#`
Copy link
Member

@IanManske IanManske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

It seems to suffice to use `str downcase` followed by `str kebab-case`
to arrive at the same behavior as the markdown anchor generation.

Using `str downcase` before ensures that CamelCase doesn't get converted
erroneously.
@IanManske
Copy link
Member

For the h1 vs comment confusion, maybe we can just hardcode the whitelist of expected h1s?

@sholderbach
Copy link
Member Author

Yeah I was thinking of whitelist plus a input list for interactive addition of special new ones.

@sholderbach sholderbach merged commit 89c3d6d into nushell:main Dec 22, 2024
1 check passed
@sholderbach sholderbach deleted the toc-fix branch December 23, 2024 00:30
@fdncred
Copy link
Collaborator

fdncred commented Dec 23, 2024

pr 1000, nice!

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