-
-
Notifications
You must be signed in to change notification settings - Fork 206
Open
Labels
enhancementNew functionality or behaviorNew functionality or behavior
Description
Description
It would be nice if there was an option to have a blacklist of HTML IDs that should be considered "already used" when generating the anchor IDs. These would be handled like they were a duplicate heading where the count is appended to it.
This would be an alternative to having to use id_prefix and prepending something to all the IDs, that way they can look normal besides the blacklisted ones.
Example
Have an array for the config:
$config = [
'heading_permalink' => [
'id_blacklist' => ['example-id', 'another-example'],
],
];Then if you have headings that generate an ID that matches one in the list:
## Example ID
...
## Another Example
...
## Another Example
......it would generate the IDs as if they were already used:
<h2>Example ID <a id="example-id-1" href="#example-id-1"></h2>
...
<h2>Another Example <a id="another-example-1" href="#another-example-1"></h2>
...
<h2>Another Example <a id="another-example-2" href="#another-example-2"></h2>
...Did this project help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew functionality or behaviorNew functionality or behavior