Skip to content

Feat: Allow named markdown anchor links #966

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

Conversation

kikito
Copy link
Contributor

@kikito kikito commented Jun 1, 2021

Markdown links don't always have their urls attached. Named links allow
putting them afterwards. This change allows the reader to understand
this pattern on the tag headers:

## [1.0.0]

This is version 1.0.0

## [0.9.1]

This is version 0.9.1

## [0.9.0]
...

[1.0.0]: https://github.com/myorg/myrepo/compare/0.9.1...1.0.0
[0.9.1]: https://github.com/myorg/myrepo/compare/0.9.1...0.9.0
...

Without this change, the generator will get confused by the brackets
around the versions, and complain that "it cannot find the [1.0.0]
tag" on all_tags (which don't have the brackets)

Markdown links don't always have their urls attached. Named links allow
putting them afterwards. This change allows the reader to understand
this pattern on the tag headers:

    ## [1.0.0]

    This is version 1.0.0

    ## [0.9.1]

    This is version 0.9.1

    ## [0.9.0]
    ...

    [1.0.0]: https://github.com/myorg/myrepo/compare/0.9.1...1.0.0
    [0.9.1]: https://github.com/myorg/myrepo/compare/0.9.1...0.9.0
    ...

Without this change, the generator will get confused by the brackets
around the versions, and complain that "it cannot find the [1.0.0]
tag" on `all_tags` (which don't have the brackets)
@kikito kikito force-pushed the feat/parse-named-links branch from 9daa99f to 548152b Compare June 1, 2021 17:55
Copy link
Collaborator

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

The tests empower the reviewer, as tbray said.

This change would help the user who wanted to link to a version, as well.

@olleolleolle olleolleolle merged commit b112b8e into github-changelog-generator:master Jun 1, 2021
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.

2 participants