[ 
https://issues.apache.org/jira/browse/DOXIA-710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17792448#comment-17792448
 ] 

ASF GitHub Bot commented on DOXIA-710:
--------------------------------------

michael-o commented on PR #180:
URL: https://github.com/apache/maven-doxia/pull/180#issuecomment-1837260464

   > > This seems like a reimplementation of RandomAccessSink: The 
RandomAccessSink provides the ability to create a {https://github.com/link 
Sink} with hooks. Why not evaluate it if it there.
   > 
   > I was not aware of this class, but `RandomAccessSink` is complex to grasp 
for me. I would rather go for reimplementing RandomAccessSink as special 
SinkWrapper. AFAIK RandomAccessSink does not allow to intercept sink API calls 
and enrich them but just does some buffering and concatenating multiple sink 
outputs into one effective one.
   
   I don't see  need to modify/intercept the sink at all, a parser can do this 
perfectly with some buffering. `TOCMacro` does this buffering with a fresh 
parser as well.
   
   > > This should not be related to the TOC macro although the TOC macro will 
benefit. A user can request auto anchors regardless of the TOC macro. Don't 
conflate them.
   > 
   > For me the TOC is the primary use case, but I am ok with always generating 
anchors and TOC macro will just use those.
   
   Correct, TOC will use what has been generated, therefore a parser switch...
   
   > > I think that a solution should be logically identical to 
org.apache.maven.doxia.parser.Parser.setEmitComments(boolean). A parser feature 
will intercept section title text and buffer until sectionTitle_() is hit, 
anchor and title (heading) are emitted.
   > 
   > As long as the default is "emit anchors for every section title" I am fine 
with adding an option to disable that. I don't think we should make that an 
opt-in behaviour as that would be breaking change from a user's perspective.
   
   Well, making it default would be breaking because Apt, for example does not 
have implicit anchors. What I see is tht the opt-in will be enabled from the 
Maven Site Plugin invocation and not Doxia directly. That will cover your use 
case and won't break anything for others.




> 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)

Reply via email to