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

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

hboutemy commented on code in PR #116:
URL: https://github.com/apache/maven-doxia/pull/116#discussion_r979373726


##########
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:
   it seems that this link(String, String) method is more than "duplicate 
code": it's dead code that was introduced into Doxia 1.1 and was never called 
outside the unit test
   then I'm all in to remove this dead code and update the associated unit 
test, with proper Jira issue renaming
   
   on other changes like VALIGN, that are unrelated to this dead code removal, 
I'd prefer have a separate commit and review to better understand
   
   and I don't understand why there is a discussion on "source", which seems to 
be completely an unrelated discussion





> Remove code duplication in XdocSink
> -----------------------------------
>
>                 Key: DOXIA-670
>                 URL: https://issues.apache.org/jira/browse/DOXIA-670
>             Project: Maven Doxia
>          Issue Type: Task
>          Components: Module - Xhtml
>    Affects Versions: 2.0.0-M3
>            Reporter: Michael Osipov
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 2.0.0-M4
>
>
> {{XdocSink}} duplicates code from the parent class. That code can be removed. 
> It has one caveat: The {{source}} element cannot be retained at all because 
> it has a completely different meaning in HTML5: 
> https://www.tutorialrepublic.com/html-reference/html5-source-tag.php and 
> since only the {{XHTML5Parser}} can properly detect the new construct 
> {{verbatim(boxed)}} will always be parsed as unboxed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to