You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/10/01 18:19:55 UTC

[GitHub] [maven-doxia] michael-o commented on a diff in pull request #116: [DOXIA-670] Remove code duplication in XdocSink

michael-o commented on code in PR #116:
URL: https://github.com/apache/maven-doxia/pull/116#discussion_r985129510


##########
doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java:
##########
@@ -505,31 +497,6 @@ public void close()
         init();
     }
 
-    /**
-     * Adds a link with an optional target.
-     *
-     * @param name the link name.
-     * @param target the link target, may be null.
-     */
-    public void link( String name, String target )
-    {
-        if ( isHeadFlag() )
-        {
-            return;
-        }
-
-        MutableAttributeSet att = new SinkEventAttributeSet();
-
-        att.addAttribute( Attribute.HREF, HtmlTools.escapeHTML( name ) );
-
-        if ( target != null )
-        {
-            att.addAttribute( Attribute.TARGET, target );
-        }
-
-        writeStartTag( A, att );
-    }
-

Review Comment:
   @hboutemy Done, completely reduced. Attributes are in another ticket. As for the `source`. HTML5 has now a source element which collides with Xdoc's source. That is why I decided not to fiddle with at the moment. Forget about it.



-- 
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-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org