-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2259 from Kotlin/2213-description-list-support
Description list support for JavaDocs (#2213)
- Loading branch information
Showing
12 changed files
with
304 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
plugins/base/src/test/kotlin/renderers/html/ListStylesTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package renderers.html | ||
|
||
import org.jetbrains.dokka.base.renderers.html.HtmlRenderer | ||
import org.jetbrains.dokka.pages.ListStyle | ||
import org.junit.jupiter.api.Test | ||
import renderers.testPage | ||
import utils.Dd | ||
import utils.Dl | ||
import utils.Dt | ||
import utils.match | ||
|
||
|
||
class ListStylesTest : HtmlRenderingOnlyTestBase() { | ||
|
||
@Test | ||
fun `description list render`() { | ||
val page = testPage { | ||
descriptionList { | ||
item(styles = setOf(ListStyle.DescriptionTerm)) { | ||
text("Description term #1") | ||
} | ||
item(styles = setOf(ListStyle.DescriptionTerm)) { | ||
text("Description term #2") | ||
} | ||
item(styles = setOf(ListStyle.DescriptionDetails)) { | ||
text("Description details describing terms #1 and #2") | ||
} | ||
} | ||
} | ||
|
||
|
||
HtmlRenderer(context).render(page) | ||
renderedContent.match( | ||
Dl( | ||
Dt("Description term #1"), | ||
Dt("Description term #2"), | ||
Dd("Description details describing terms #1 and #2") | ||
) | ||
) | ||
} | ||
} |
Oops, something went wrong.