diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-27 16:40:08 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-27 16:40:08 +0100 |
commit | a9538f2f49e15b04340215d8d670557ced6f132d (patch) | |
tree | 9195f9a29d2795e524a8acb1ab09d60409699a18 /test | |
parent | 4494fd064900fc9ddd9766eed581980c2e360e96 (diff) | |
download | dokka-a9538f2f49e15b04340215d8d670557ced6f132d.tar.gz dokka-a9538f2f49e15b04340215d8d670557ced6f132d.tar.bz2 dokka-a9538f2f49e15b04340215d8d670557ced6f132d.zip |
use JSoup to convert HTML markup in javadoc to content tree
Diffstat (limited to 'test')
-rw-r--r-- | test/data/format/javaDeprecated.html | 2 | ||||
-rw-r--r-- | test/data/format/javaLinkTag.html | 3 | ||||
-rw-r--r-- | test/data/format/javadocHtml.java | 16 | ||||
-rw-r--r-- | test/data/format/javadocHtml.md | 20 | ||||
-rw-r--r-- | test/src/format/MarkdownFormatTest.kt | 6 |
5 files changed, 44 insertions, 3 deletions
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 @@ <br/> <h1>foo</h1> <code><span class="keyword">public</span> <span class="keyword">open</span> <span class="keyword">fun </span><s><span class="identifier">foo</span></s><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><br/> -<strong>Deprecated:</strong> use<a href="test/test/-foo/bar">#bar</a> instead <p></p> +<strong>Deprecated:</strong> use<code><a href="test/test/-foo/bar">#bar</a></code> instead <p></p> <br/> <br/> </BODY> 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 @@ <br/> <h1>Foo</h1> <code><span class="keyword">open</span> <span class="keyword">class </span><span class="identifier">Foo</span></code><br/> -<p>Call <a href="test/test/-foo/bar">#bar()</a> to do the job. - </p> +<p>Call <code><a href="test/test/-foo/bar">#bar()</a></code> to do the job. </p> <br/> <br/> <h3>Functions</h3> 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; + +/** + * <b>Bold</b> + * <strong>Strong</strong> + * <i>Italic</i> + * <em>Emphasized</em> + * <p>Paragraph</p> + * <s>Strikethrough</s> + * <del>Deleted</del> + * <code>Code</code> + * <pre>Block code</pre> + * <ul><li>List Item</li></ul> + */ +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) + } + } } |