From a9538f2f49e15b04340215d8d670557ced6f132d Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 27 Feb 2015 16:40:08 +0100 Subject: use JSoup to convert HTML markup in javadoc to content tree --- test/data/format/javaDeprecated.html | 2 +- test/data/format/javaLinkTag.html | 3 +-- test/data/format/javadocHtml.java | 16 ++++++++++++++++ test/data/format/javadocHtml.md | 20 ++++++++++++++++++++ test/src/format/MarkdownFormatTest.kt | 6 ++++++ 5 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 test/data/format/javadocHtml.java create mode 100644 test/data/format/javadocHtml.md (limited to 'test') diff --git a/test/data/format/javaDeprecated.html b/test/data/format/javaDeprecated.html index ca818bb7..f9376bf5 100644 --- a/test/data/format/javaDeprecated.html +++ b/test/data/format/javaDeprecated.html @@ -7,7 +7,7 @@

foo

public open fun foo(): Unit
-Deprecated: use#bar instead

+Deprecated: use#bar instead



diff --git a/test/data/format/javaLinkTag.html b/test/data/format/javaLinkTag.html index d6ced4ce..af63710d 100644 --- a/test/data/format/javaLinkTag.html +++ b/test/data/format/javaLinkTag.html @@ -7,8 +7,7 @@

Foo

open class Foo
-

Call #bar() to do the job. -

+

Call #bar() to do the job.



Functions

diff --git a/test/data/format/javadocHtml.java b/test/data/format/javadocHtml.java new file mode 100644 index 00000000..bcb2cf91 --- /dev/null +++ b/test/data/format/javadocHtml.java @@ -0,0 +1,16 @@ +package test; + +/** + * Bold + * Strong + * Italic + * Emphasized + *

Paragraph

+ * Strikethrough + * Deleted + * Code + *
Block code
+ * + */ +public class C { +} diff --git a/test/data/format/javadocHtml.md b/test/data/format/javadocHtml.md new file mode 100644 index 00000000..303b102c --- /dev/null +++ b/test/data/format/javadocHtml.md @@ -0,0 +1,20 @@ +[test](test/index) / [test](test/test/index) / [C](test/test/-c) + + +# C + +`public open class C` + +**Bold** **Strong** *Italic* *Emphasized* +Paragraph + + ~~Strikethrough~~ ~~Deleted~~ `Code` +``` +Block code +``` + + * List Item + + + + diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt index 4b207b75..7253ddb4 100644 --- a/test/src/format/MarkdownFormatTest.kt +++ b/test/src/format/MarkdownFormatTest.kt @@ -118,4 +118,10 @@ public class MarkdownFormatTest { markdownService.appendNodes(tempLocation, output, model.members.single().members) } } + + Test fun javadocHtml() { + verifyOutput("test/data/format/javadocHtml.java", ".md") { model, output -> + markdownService.appendNodes(tempLocation, output, model.members.single().members) + } + } } -- cgit