Affects Version/s: 9.8.1
Fix Version/s: None
In our case we have documents with some macros and the macros are using templates for their rendering.
I noticed that if a document content contains html headings (H1, H2, H3 ...) and if there are multipe headings with the same text, the headings IDs are not correctly rendered when the headings are coming from templates.
It seems that the templates are not taking in consideration the other headings generated outside of the template.
The headings IDs are generated based on the heading's text after spaces and special characters are removed, normally when we have multiple headings with the same text in a document, the headings IDs are incremented.
After some tests I managed to reproduce the issue using a simple template, follow steps below:
- Create a wiki page
- Set the page content with the code below, save and view:
The code of the template 'mytemplate.vm':
Expected result: the rendered content should looks like:
As we can see from the exemple the headings IDs numbering is working correclty inside the template but it is not taking in consideration the headings outside the template.
Note that the same error appears when we use the include macro to include a page that contains html headings.