From c13d0441dddf31ef019333fd16378b3fc56003a4 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 9 Mar 2019 02:51:11 +0100 Subject: Unary plus support for DSL builders in the Tag class. --- src/main/kotlin/pl/treksoft/kvision/html/Tag.kt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/kotlin') diff --git a/src/main/kotlin/pl/treksoft/kvision/html/Tag.kt b/src/main/kotlin/pl/treksoft/kvision/html/Tag.kt index 48f6a9eb..f3f41939 100644 --- a/src/main/kotlin/pl/treksoft/kvision/html/Tag.kt +++ b/src/main/kotlin/pl/treksoft/kvision/html/Tag.kt @@ -172,6 +172,13 @@ open class Tag( return cl } + operator fun String.unaryPlus() { + if (content == null) + content = this + else + content += this + } + companion object { /** * DSL builder extension function. -- cgit