Closed ErikMichelson closed 3 years ago
Are there any news? We need this change (and a release) for https://github.com/codimd/react-client/pull/642 :/
@nagaozen Please let us know if you have time to review the open PRs and create a new release. We need this fixes. If you don't have time, then let us know and we'll fork the project to apply the PRs ourself.
@mrdrogdrog Sincerely apologize, I'll take a look tonight. This project is tightly coupled with markdown-it-anchor
so I'll review both packages and release'em.
i'd to update the name of the option to uniqueSlugStartIndex
to follow the markdown-it-anchor
options.
Note: This PR is based on #39, which should be merged prior to this one.(done)This PR adds the option
slugStartIndex
that allows to define a custom number to start the counting of suffixes for duplicate headings.If #40 is merged before this, I will add the change in types of course with this PR too.(done)Breaking: This PR sets the default value for slugStartIndex to 1 to be compatible with markdown-it-anchor v6 out of the box.
Example:
will now result in something like this (note the suffix "-1" instead of "-2").
Fixes #38