diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/hover/MarkdownCommentTests.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/hover/MarkdownCommentTests.java index e44c2b1fc6a..8f604173371 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/hover/MarkdownCommentTests.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/hover/MarkdownCommentTests.java @@ -899,4 +899,63 @@

This is a test Javadoc for method test4() """; assertHtmlContent(expectedContent, actualHtmlContent); } + @Test + public void testFenceLenFour_1() throws CoreException { + String source= """ + /// ```` + /// ``` + /// @param is not a tag here because this is nested literal *markdown* + /// ``` + /// ```` + public class FenceLenFour { + } + """; + ICompilationUnit cu= getWorkingCopy("/TestSetupProject/src/p/FenceLenFour.java", source, null); + assertNotNull("FenceLenFour.java", cu); + + String expectedContent= """ +

```
+				@param is not a tag here because this is nested literal *markdown*
+				```
+				
+ """; + IType type= cu.getType("FenceLenFour"); + String actualHtmlContent= getHoverHtmlContent(cu, type); + assertHtmlContent(expectedContent, actualHtmlContent); + } + @Test + public void testFenceLenFour_2() throws CoreException { + String source= """ + public class FenceLenFour { + /// ````` + /// ```` + /// ``` + /// @param is not a tag here because this is nested literal *markdown* + /// ``` + /// ```` + /// ````` + /// @return an int value + /// @param i real param + public int foo(int i) { + return 0; + } + } + """; + ICompilationUnit cu= getWorkingCopy("/TestSetupProject/src/p/FenceLenFour.java", source, null); + assertNotNull("FenceLenFour.java", cu); + + String expectedContent= """ +
````
+				```
+				@param is not a tag here because this is nested literal *markdown*
+				```
+				````
+				
+
Parameters:
i real param
Returns:
an int value
+ """; + IType type= cu.getType("FenceLenFour"); + IMethod method= type.getMethods()[0]; + String actualHtmlContent= getHoverHtmlContent(cu, method); + assertHtmlContent(expectedContent, actualHtmlContent); + } }