@@ -0,0 +1,1170 @@
+package org.commonmark.ext.headerids;%0A%0Aimport org.commonmark.Extension;%0Aimport org.commonmark.ext.headerids.internal.HeaderIdAttributeProvider;%0Aimport org.commonmark.html.HtmlRenderer;%0A%0A/**%0A * Extension for adding auto generated ids to headings%0A * %3Cp%3E%0A * Create it with %7B@link #create()%7D and then configure it on the builder%0A * %7B@link org.commonmark.html.HtmlRenderer.Builder#extensions(Iterable)%7D).%0A * %3C/p%3E%0A * %3Cp%3E%0A * The heading text will be used to create the id. Multiple headings with the%0A * same text will result in appending a hyphen and number. For example:%0A * %3C/p%3E%0A * %3Ccode%3E%0A * %3Cpre%3E%0A * # Heading%0A * # Heading%0A * %3C/pre%3E%0A * %3C/code%3E%0A * will result in%0A * %3Ccode%3E%0A * %3Cpre%3E%0A * &lt;h1 id=%22heading%22&gt;Heading&lt;/h1&gt;%0A * &lt;h1 id=%22heading-1%22&gt;Heading&lt;/h1&gt;%0A * %3C/pre%3E%0A * %3C/code%3E%0A *%0A */%0Apublic class HeaderIdExtension implements HtmlRenderer.HtmlRendererExtension%0A%7B%0A    private HeaderIdExtension() %7B%0A    %7D%0A%0A    public static Extension create() %7B%0A        return new HeaderIdExtension();%0A    %7D%0A%0A    @Override%0A    public void extend(HtmlRenderer.Builder rendererBuilder)%0A    %7B%0A        rendererBuilder.attributeProvider(HeaderIdAttributeProvider.create());%0A    %7D%0A%7D%0A

Create extension point to be used when registering this in the renderer