diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-03-09 02:51:11 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-03-09 02:51:11 +0100 |
commit | c13d0441dddf31ef019333fd16378b3fc56003a4 (patch) | |
tree | cc75ce1643c73ce4f8675876410ba9118f5969ef /src/main/kotlin/pl/treksoft/kvision/html | |
parent | 74439213455a192f82751cfc1b98878620d815b9 (diff) | |
download | kvision-c13d0441dddf31ef019333fd16378b3fc56003a4.tar.gz kvision-c13d0441dddf31ef019333fd16378b3fc56003a4.tar.bz2 kvision-c13d0441dddf31ef019333fd16378b3fc56003a4.zip |
Unary plus support for DSL builders in the Tag class.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/html')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/html/Tag.kt | 7 |
1 files changed, 7 insertions, 0 deletions
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. |