@@ -2014,4 +2014,42 @@ public class Markdown() {}
20142014 assertTrue (tagFragments .get (1 ) instanceof SimpleName );
20152015 }
20162016 }
2017+
2018+ // [)[) - invalid condition
2019+ public void testMarkdownURLs4531_06 () throws JavaModelException {
2020+ String source = """
2021+ /// @see [Ex Si)[http://ex.com)
2022+ public class Markdown() {}
2023+ """ ;
2024+ this .workingCopies = new ICompilationUnit [1 ];
2025+ this .workingCopies [0 ] = getWorkingCopy ("/Converter_25/src/markdown/gh3761/Markdown.java" , source , null );
2026+ if (this .docCommentSupport .equals (JavaCore .ENABLED )) {
2027+ CompilationUnit compilUnit = (CompilationUnit ) runConversion (this .workingCopies [0 ], true );
2028+ TypeDeclaration typedeclaration = (TypeDeclaration ) compilUnit .types ().get (0 );
2029+ Javadoc javadoc = typedeclaration .getJavadoc ();
2030+ TagElement tags = (TagElement ) javadoc .tags ().get (0 );
2031+ assertEquals ("fragments count does not match" , 3 , tags .fragments ().size ());
2032+ assertTrue (tags .fragments ().get (0 ) instanceof TextElement );
2033+ assertTrue (tags .fragments ().get (1 ) instanceof TextElement );
2034+ assertTrue (tags .fragments ().get (2 ) instanceof TagElement );
2035+ }
2036+ }
2037+
2038+ // (](] - invalid condition
2039+ public void testMarkdownURLs4531_07 () throws JavaModelException {
2040+ String source = """
2041+ /// @see (Ex Si](http://ex.com]
2042+ public class Markdown() {}
2043+ """ ;
2044+ this .workingCopies = new ICompilationUnit [1 ];
2045+ this .workingCopies [0 ] = getWorkingCopy ("/Converter_25/src/markdown/gh3761/Markdown.java" , source , null );
2046+ if (this .docCommentSupport .equals (JavaCore .ENABLED )) {
2047+ CompilationUnit compilUnit = (CompilationUnit ) runConversion (this .workingCopies [0 ], true );
2048+ TypeDeclaration typedeclaration = (TypeDeclaration ) compilUnit .types ().get (0 );
2049+ Javadoc javadoc = typedeclaration .getJavadoc ();
2050+ TagElement tags = (TagElement ) javadoc .tags ().get (0 );
2051+ assertEquals ("fragments count does not match" , 1 , tags .fragments ().size ());
2052+ assertTrue (tags .fragments ().get (0 ) instanceof TextElement );
2053+ }
2054+ }
20172055}
0 commit comments