From ddd22fc7652f468f57c5a9dca380743eea53be5d Mon Sep 17 00:00:00 2001 From: ingo Date: Wed, 6 Jan 2016 13:39:54 +0100 Subject: Linking to a target with underscores did not work For example, in a link like [MY_VALUE], the link would only try to resolve the text "MY" until the first underscore. Since the markdown parser parses the link label as [TEXT:MY, EMPH:_, TEXT:VALUE], using the first TEXT child node is not sufficient. --- core/src/test/kotlin/model/LinkTest.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/src/test/kotlin') diff --git a/core/src/test/kotlin/model/LinkTest.kt b/core/src/test/kotlin/model/LinkTest.kt index c30e1c10..ac49cae6 100644 --- a/core/src/test/kotlin/model/LinkTest.kt +++ b/core/src/test/kotlin/model/LinkTest.kt @@ -25,6 +25,16 @@ public class LinkTest { } } + @Test fun linkToConstantWithUnderscores() { + verifyModel("testdata/links/linkToConstantWithUnderscores.kt") { model -> + with(model.members.single().members.single()) { + assertEquals("Foo", name) + assertEquals(DocumentationNode.Kind.Class, kind) + assertEquals("This is link to [MY_CONSTANT_VALUE -> CompanionObjectProperty:MY_CONSTANT_VALUE]", content.summary.toTestString()) + } + } + } + @Test fun linkToQualifiedMember() { verifyModel("testdata/links/linkToQualifiedMember.kt") { model -> with(model.members.single().members.single()) { -- cgit