kwin commented on PR #180: URL: https://github.com/apache/maven-doxia/pull/180#issuecomment-1831556494
> 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 sinks into one effective one. > 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. > 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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org