Skip to content

Commit

Permalink
Fix description of samp and add strike tag
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinAman committed Jul 9, 2021
1 parent a2694ff commit 9d24dcd
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 5 deletions.
11 changes: 11 additions & 0 deletions api/kotlinx-html.api
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,8 @@ public final class kotlinx/html/Gen_consumer_tagsKt {
public static synthetic fun source$default (Lkotlinx/html/TagConsumer;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun span (Lkotlinx/html/TagConsumer;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static synthetic fun span$default (Lkotlinx/html/TagConsumer;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun strike (Lkotlinx/html/TagConsumer;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static synthetic fun strike$default (Lkotlinx/html/TagConsumer;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun strong (Lkotlinx/html/TagConsumer;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static synthetic fun strong$default (Lkotlinx/html/TagConsumer;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun style (Lkotlinx/html/TagConsumer;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
Expand Down Expand Up @@ -1423,6 +1425,8 @@ public final class kotlinx/html/Gen_tag_groupsKt {
public static synthetic fun pre$default (Lkotlinx/html/FlowContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
public static final fun putForm (Lkotlinx/html/FlowContent;Ljava/lang/String;Lkotlinx/html/FormEncType;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
public static synthetic fun putForm$default (Lkotlinx/html/FlowContent;Ljava/lang/String;Lkotlinx/html/FormEncType;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
public static final fun strike (Lkotlinx/html/FlowContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
public static synthetic fun strike$default (Lkotlinx/html/FlowContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
public static final fun summary (Lkotlinx/html/FlowContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
public static synthetic fun summary$default (Lkotlinx/html/FlowContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
public static final fun table (Lkotlinx/html/FlowContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
Expand Down Expand Up @@ -1892,6 +1896,7 @@ public final class kotlinx/html/Gen_tags_sKt {
public static final fun getAsFlowContent (Lkotlinx/html/SELECT;)Lkotlinx/html/FlowContent;
public static final fun getAsFlowContent (Lkotlinx/html/SMALL;)Lkotlinx/html/FlowContent;
public static final fun getAsFlowContent (Lkotlinx/html/SPAN;)Lkotlinx/html/FlowContent;
public static final fun getAsFlowContent (Lkotlinx/html/STRIKE;)Lkotlinx/html/FlowContent;
public static final fun getAsFlowContent (Lkotlinx/html/STRONG;)Lkotlinx/html/FlowContent;
public static final fun getAsFlowContent (Lkotlinx/html/STYLE;)Lkotlinx/html/FlowContent;
public static final fun getAsFlowContent (Lkotlinx/html/SUB;)Lkotlinx/html/FlowContent;
Expand All @@ -1905,6 +1910,7 @@ public final class kotlinx/html/Gen_tags_sKt {
public static final fun getAsPhrasingContent (Lkotlinx/html/SELECT;)Lkotlinx/html/PhrasingContent;
public static final fun getAsPhrasingContent (Lkotlinx/html/SMALL;)Lkotlinx/html/PhrasingContent;
public static final fun getAsPhrasingContent (Lkotlinx/html/SPAN;)Lkotlinx/html/PhrasingContent;
public static final fun getAsPhrasingContent (Lkotlinx/html/STRIKE;)Lkotlinx/html/PhrasingContent;
public static final fun getAsPhrasingContent (Lkotlinx/html/STRONG;)Lkotlinx/html/PhrasingContent;
public static final fun getAsPhrasingContent (Lkotlinx/html/SUB;)Lkotlinx/html/PhrasingContent;
public static final fun getAsPhrasingContent (Lkotlinx/html/SUP;)Lkotlinx/html/PhrasingContent;
Expand Down Expand Up @@ -2762,6 +2768,11 @@ public class kotlinx/html/SPAN : kotlinx/html/HTMLTag, kotlinx/html/HtmlBlockInl
public fun getConsumer ()Lkotlinx/html/TagConsumer;
}

public class kotlinx/html/STRIKE : kotlinx/html/HTMLTag, kotlinx/html/HtmlBlockInlineTag {
public fun <init> (Ljava/util/Map;Lkotlinx/html/TagConsumer;)V
public fun getConsumer ()Lkotlinx/html/TagConsumer;
}

public class kotlinx/html/STRONG : kotlinx/html/HTMLTag, kotlinx/html/HtmlBlockInlineTag {
public fun <init> (Ljava/util/Map;Lkotlinx/html/TagConsumer;)V
public fun getConsumer ()Lkotlinx/html/TagConsumer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fun humanizeJoin(parts: Iterable<String>, separator: String): String {
filteredParts.add(cutPart)
}

return filteredParts.joinToString(separator = separator, transform = String::capitalize) + trailingParts.joinToString("", transform = String::capitalize)
return filteredParts.joinToString(separator = separator) { it.capitalize() } + trailingParts.joinToString("") { it.capitalize() }
}

private fun String.replaceMistakesAndUglyWords() : String =
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/resources/html_5.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@

<xsd:element ref="var"/>
<xsd:element ref="video"/>
<xsd:element ref="strike"/>

</xsd:choice>
</xsd:group>
Expand Down Expand Up @@ -831,6 +832,7 @@
<xsd:element name="main" type="simplePhrasingContentElement"/>
<xsd:element name="mark" type="simplePhrasingContentElement"/>
<xsd:element name="math" type="simplePhrasingContentElement"/>
<xsd:element name="strike" type="simplePhrasingContentElement"/>

<xsd:element name="progress">
<xsd:complexType mixed="true">
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/resources/htmltable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@
/>
<tag name = "samp"
helpref = "struct/text.html#edef-SAMP"
description = "strike-through text style"
description = "computer output text style"
startTag = "true"
endTag = "true"
empty = "false"
Expand Down
8 changes: 7 additions & 1 deletion src/commonMain/kotlin/generated/gen-consumer-tags.kt
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ inline fun <T, C : TagConsumer<T>> C.rt(classes : String? = null, crossinline bl
inline fun <T, C : TagConsumer<T>> C.ruby(classes : String? = null, crossinline block : RUBY.() -> Unit = {}) : T = RUBY(attributesMapOf("class", classes), this).visitAndFinalize(this, block)

/**
* Strike-through text style
* Computer output text style
*/
@HtmlTagMarker
inline fun <T, C : TagConsumer<T>> C.samp(classes : String? = null, crossinline block : SAMP.() -> Unit = {}) : T = SAMP(attributesMapOf("class", classes), this).visitAndFinalize(this, block)
Expand Down Expand Up @@ -575,6 +575,12 @@ inline fun <T, C : TagConsumer<T>> C.source(classes : String? = null, crossinlin
@HtmlTagMarker
inline fun <T, C : TagConsumer<T>> C.span(classes : String? = null, crossinline block : SPAN.() -> Unit = {}) : T = SPAN(attributesMapOf("class", classes), this).visitAndFinalize(this, block)

/**
* Strike-through text
*/
@HtmlTagMarker
inline fun <T, C : TagConsumer<T>> C.strike(classes : String? = null, crossinline block : STRIKE.() -> Unit = {}) : T = STRIKE(attributesMapOf("class", classes), this).visitAndFinalize(this, block)

/**
* Strong emphasis
*/
Expand Down
6 changes: 6 additions & 0 deletions src/commonMain/kotlin/generated/gen-tag-groups.kt
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ inline fun FlowContent.table(classes : String? = null, crossinline block : TABLE
@HtmlTagMarker
inline fun FlowContent.ul(classes : String? = null, crossinline block : UL.() -> Unit = {}) : Unit = UL(attributesMapOf("class", classes), consumer).visit(block)

/**
* Strike-through text
*/
@HtmlTagMarker
inline fun FlowContent.strike(classes : String? = null, crossinline block : STRIKE.() -> Unit = {}) : Unit = STRIKE(attributesMapOf("class", classes), consumer).visit(block)

/**
* Document base URI
*/
Expand Down
2 changes: 1 addition & 1 deletion src/commonMain/kotlin/generated/gen-tag-unions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ inline fun FlowOrPhrasingContent.q(classes : String? = null, crossinline block :
inline fun FlowOrPhrasingContent.ruby(classes : String? = null, crossinline block : RUBY.() -> Unit = {}) : Unit = RUBY(attributesMapOf("class", classes), consumer).visit(block)

/**
* Strike-through text style
* Computer output text style
*/
@HtmlTagMarker
inline fun FlowOrPhrasingContent.samp(classes : String? = null, crossinline block : SAMP.() -> Unit = {}) : Unit = SAMP(attributesMapOf("class", classes), consumer).visit(block)
Expand Down
11 changes: 11 additions & 0 deletions src/commonMain/kotlin/generated/gen-tags-s.kt
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@ val SPAN.asPhrasingContent : PhrasingContent
get() = this


@Suppress("unused")
open class STRIKE(initialAttributes : Map<String, String>, override val consumer : TagConsumer<*>) : HTMLTag("strike", consumer, initialAttributes, null, false, false), HtmlBlockInlineTag {

}
val STRIKE.asFlowContent : FlowContent
get() = this

val STRIKE.asPhrasingContent : PhrasingContent
get() = this


@Suppress("unused")
open class STRONG(initialAttributes : Map<String, String>, override val consumer : TagConsumer<*>) : HTMLTag("strong", consumer, initialAttributes, null, true, false), HtmlBlockInlineTag {

Expand Down
8 changes: 7 additions & 1 deletion src/jsMain/kotlin/generated/gen-consumer-tags-js.kt
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ public inline fun TagConsumer<HTMLElement>.rt(classes : String? = null, crossinl
public inline fun TagConsumer<HTMLElement>.ruby(classes : String? = null, crossinline block : RUBY.() -> Unit = {}) : HTMLElement = RUBY(attributesMapOf("class", classes), this).visitAndFinalize(this, block)

/**
* Strike-through text style
* Computer output text style
*/
@HtmlTagMarker
public inline fun TagConsumer<HTMLElement>.samp(classes : String? = null, crossinline block : SAMP.() -> Unit = {}) : HTMLElement = SAMP(attributesMapOf("class", classes), this).visitAndFinalize(this, block)
Expand Down Expand Up @@ -576,6 +576,12 @@ public inline fun TagConsumer<HTMLElement>.source(classes : String? = null, cros
@HtmlTagMarker
public inline fun TagConsumer<HTMLElement>.span(classes : String? = null, crossinline block : SPAN.() -> Unit = {}) : HTMLSpanElement = SPAN(attributesMapOf("class", classes), this).visitAndFinalize(this, block) as HTMLSpanElement

/**
* Strike-through text
*/
@HtmlTagMarker
public inline fun TagConsumer<HTMLElement>.strike(classes : String? = null, crossinline block : STRIKE.() -> Unit = {}) : HTMLElement = STRIKE(attributesMapOf("class", classes), this).visitAndFinalize(this, block)

/**
* Strong emphasis
*/
Expand Down

0 comments on commit 9d24dcd

Please sign in to comment.