- Issue created by @aaronpinero
When the TOC header ID type is set to 'key' and the TOC filter option 'Exclude text above the TOC' is checked, the anchor links in the TOC will be incorrect.
- Set the Simple TOC type to use 'key' header ID types.
- In the configuration of the text input format, activate the TOC filter and set the filter to use the Simple TOC type. Leave the "automatically include TOC" option blank, don't check the "display contents in a block", but check the "Exclude text above the TOC" option.
- Create a page. Use the text input that has the TOC filter enabled. Create several H2 headings in the page, but place the TOC element below the first heading, above the second heading.
- When the page is published, view the source of the page. The anchor link keys in the TOC will begin with the number 1 even though the key number 1 has been assigned to the first heading (which is ignored by the TOC filter).
Either the ignored heading should not receive an id attribute with a key value or the anchor links in the TOC should begin with the key value of the first heading that is actually used in the contents, rather than 1.
Active
2.1
Code