Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-22104

{toc} macro does not generate anchor link for heading that has macros

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Low
    • None
    • 3.1.1, 3.1.2, 3.4.9, 3.5
    • None

    Description

      {toc}
      
      h1. Heading 1
      h2. Heading 1.1
      h3. Heading 1.1.3
      
      h1. {color:red}Heading 2{color}
      h2. {color:red}Heading 2.1{color}
      h3. {color:red}Heading 2.1.1{color}
      

      When viewing the page source:

      <h1><a name="testing-Heading1"></a>Heading 1</h1>
      <h2><a name="testing-Heading1.1"></a>Heading 1.1</h2>
      <h3><a name="testing-Heading1.1.3"></a>Heading 1.1.3</h3>
      
      <h1><a name="testing-"></a><font color="red">Heading 2</font></h1>
      <h2><a name="testing-"></a><font color="red">Heading 2.1</font></h2>
      <h3><a name="testing-"></a><font color="red">Heading 2.1.1</font></h3>
      

      The header is not generated with a unique name. The toc macro only grab the name of the heading and as a result the three heading has the same heading name in the link generated by toc macro

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              klfoong Foong (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: