Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8289332

Auto-generate ids for user-defined headings

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P3
    • 20
    • 19
    • tools

    Description

      It would be good to ensure that all HTML headings (<hN>...</hN) in user-defined doc comments have an id, so that the heading can be the target of a link.

      This suggests providing an id when there is none, perhaps by using an algorithm similar to that used in pandoc/markdown: change letters to lower case and replace sequences of non-identifier characters with a hyphen.

      We might want an encoding that prevents accidental clashes with existing ids, such as those that may be generated for field names. It may be enough to ensure that there is at least one hyphen. We should also ensure no clashes with other standard ids, such as those defined internally in `HtmlIds`.

      Overall, this would interact well with the ability to copy a URL to the clipboard. JDK-8277420

      Attachments

        Issue Links

          Activity

            People

              hannesw Hannes Wallnoefer
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: