@@ -2071,4 +2071,69 @@ public class Markdown() {}
20712071 assertTrue (tags .fragments ().get (1 ) instanceof TextElement );
20722072 }
20732073 }
2074+
2075+ public void testMarkdownURLs4531_09 () throws JavaModelException {
2076+ String source = """
2077+ /// @see [Ex Si]( http://ex.com)
2078+ public class Markdown() {}
2079+ """ ;
2080+ this .workingCopies = new ICompilationUnit [1 ];
2081+ this .workingCopies [0 ] = getWorkingCopy ("/Converter_25/src/markdown/gh3761/Markdown.java" , source , null );
2082+ if (this .docCommentSupport .equals (JavaCore .ENABLED )) {
2083+ CompilationUnit compilUnit = (CompilationUnit ) runConversion (this .workingCopies [0 ], true );
2084+ TypeDeclaration typedeclaration = (TypeDeclaration ) compilUnit .types ().get (0 );
2085+ Javadoc javadoc = typedeclaration .getJavadoc ();
2086+ TagElement tags = (TagElement ) javadoc .tags ().get (0 );
2087+ assertEquals ("fragments count does not match" , 2 , tags .fragments ().size ());
2088+ assertTrue (tags .fragments ().get (0 ) instanceof TextElement );
2089+ assertTrue (tags .fragments ().get (1 ) instanceof TagElement );
2090+ TagElement fragTag = (TagElement ) tags .fragments ().get (1 );
2091+ assertTrue (fragTag .fragments ().get (0 ) instanceof TextElement );
2092+ assertTrue (fragTag .fragments ().get (1 ) instanceof SimpleName );
2093+ }
2094+ }
2095+
2096+ public void testMarkdownURLs4531_10 () throws JavaModelException {
2097+ String source = """
2098+ /// @see [Ex Si][java.lang.String]
2099+ public class Markdown() {}
2100+ """ ;
2101+
2102+ this .workingCopies = new ICompilationUnit [1 ];
2103+ this .workingCopies [0 ] = getWorkingCopy ("/Converter_25/src/markdown/gh3761/Markdown.java" , source , null );
2104+ if (this .docCommentSupport .equals (JavaCore .ENABLED )) {
2105+ CompilationUnit compilUnit = (CompilationUnit ) runConversion (this .workingCopies [0 ], true );
2106+ TypeDeclaration typedeclaration = (TypeDeclaration ) compilUnit .types ().get (0 );
2107+ Javadoc javadoc = typedeclaration .getJavadoc ();
2108+ TagElement tags = (TagElement ) javadoc .tags ().get (0 );
2109+ assertEquals ("fragments count does not match" , 2 , tags .fragments ().size ());
2110+ assertTrue (tags .fragments ().get (0 ) instanceof TextElement );
2111+ assertTrue (tags .fragments ().get (1 ) instanceof TagElement );
2112+ TagElement fragTag = (TagElement ) tags .fragments ().get (1 );
2113+ assertTrue (fragTag .fragments ().get (0 ) instanceof TextElement );
2114+ assertTrue (fragTag .fragments ().get (1 ) instanceof QualifiedName );
2115+ }
2116+ }
2117+
2118+ public void testMarkdownURLs4531_11 () throws JavaModelException {
2119+ String source = """
2120+ /// @see [Ex Si][ java.lang.String]
2121+ public class Markdown() {}
2122+ """ ;
2123+
2124+ this .workingCopies = new ICompilationUnit [1 ];
2125+ this .workingCopies [0 ] = getWorkingCopy ("/Converter_25/src/markdown/gh3761/Markdown.java" , source , null );
2126+ if (this .docCommentSupport .equals (JavaCore .ENABLED )) {
2127+ CompilationUnit compilUnit = (CompilationUnit ) runConversion (this .workingCopies [0 ], true );
2128+ TypeDeclaration typedeclaration = (TypeDeclaration ) compilUnit .types ().get (0 );
2129+ Javadoc javadoc = typedeclaration .getJavadoc ();
2130+ TagElement tags = (TagElement ) javadoc .tags ().get (0 );
2131+ assertEquals ("fragments count does not match" , 2 , tags .fragments ().size ());
2132+ assertTrue (tags .fragments ().get (0 ) instanceof TextElement );
2133+ assertTrue (tags .fragments ().get (1 ) instanceof TagElement );
2134+ TagElement fragTag = (TagElement ) tags .fragments ().get (1 );
2135+ assertTrue (fragTag .fragments ().get (0 ) instanceof TextElement );
2136+ assertTrue (fragTag .fragments ().get (1 ) instanceof QualifiedName );
2137+ }
2138+ }
20742139}
0 commit comments