[ https://issues.apache.org/jira/browse/DOXIA-710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17800872#comment-17800872 ]
ASF GitHub Bot commented on DOXIA-710: -------------------------------------- michael-o commented on code in PR #180: URL: https://github.com/apache/maven-doxia/pull/180#discussion_r1437239607 ########## doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/UniqueAnchorNamesValidatorFactory.java: ########## @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.maven.doxia.sink.impl; + +import javax.inject.Named; + +import org.apache.maven.doxia.sink.Sink; + +@Named("unique-anchors-validator") +public class UniqueAnchorNamesValidatorFactory implements SinkWrapperFactory { + + @Override + public Sink createWrapper(Sink sink) { + return new UniqueAnchorNamesValidator(sink); + } + + @Override + public int getPriority() { + // should come last (after potential preprocessing/modification of anchor names) + return -1000; Review Comment: Does using `Integer.MIN_VALUE` make sense? > Inconsistent anchors between toc macro and headers > -------------------------------------------------- > > Key: DOXIA-710 > URL: https://issues.apache.org/jira/browse/DOXIA-710 > Project: Maven Doxia > Issue Type: Bug > Reporter: Slawomir Jaranowski > Assignee: Konrad Windszus > Priority: Critical > > In markdown document add: > {code:java} > <!-- MACRO{toc|fromDepth=2} --> > {code} > Then anchors generated by toc macro looks like: {{#Your_First_Mojo}} > and anchors generated by skin looks like: {{#your-first-plugin}} > - Doxia Site Renderer 2.0.0-M4 > - Fluido Skin 1.11.1 > Tested on Maven main site without more investigate. -- This message was sent by Atlassian Jira (v8.20.10#820010)