Closed ouuan closed 2 years ago
CI is running for commit df2baf20ae7dad8d524ea464db5f68a8e9f4431a.
📂 Click to track the progress, see the status, the terminal output, and the build insights.
Sent with 💌 from NxCloud.
Thanks! I'll make a release later this week 😃
Just a reminder that this is still not released.
@ouuan Must have missed it last time, released in @islands/headings@0.8.1
, thanks!
This resolves #154.
A counter is used to track the number of duplicated titles.
To pass the counter to the slug generator, the API of
generateSlug
is modified.ids are taken into account when generating distinct slugs, but duplicated ids are not resolved and kept as-is, because it's the user's responsibility to not set duplicated ids.
An example (test suite):
A consideration is that the type and initialization of
counter
limit the freedom ofHeadingOptions.slug
. Maybe we can change the parameter to a genericT
and addHeadingOption.init: (ast: Parent) => T
or useany
.