Uploaded image for project: 'Maven Doxia'
  1. Maven Doxia
  2. DOXIA-662

Non unique IDs generated by IndexingSink

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0-M3
    • 1.12.0, 2.0.0-M4, 2.0.0
    • Core
    • None

    Description

      If a HTML source contains non-unique headlines (i.e. two or more headlines with the same text) in a single HTML page the IDs being generated out of those are not unique.
      That leads to issues with e.g. the TOC macro (https://github.com/apache/maven-doxia/blob/2aea4500ba6559b91fe3a4b83a5d3aafc10116b4/doxia-core/src/main/java/org/apache/maven/doxia/macro/toc/TocMacro.java#L155) which writes an anchor link leveraging that id.

      The problematic line is https://github.com/apache/maven-doxia/blob/2aea4500ba6559b91fe3a4b83a5d3aafc10116b4/doxia-core/src/main/java/org/apache/maven/doxia/index/IndexingSink.java#L314 which just uses the (sanitized) title as id. In case of conflicts the title needs to be suffixed with an index to be unique.

      Attachments

        Issue Links

          Activity

            People

              michael-o Michael Osipov
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: