Skip to content

Commit 0ada6ac

Browse files
MarcinAmane5l
authored andcommitted
Fix description of samp and add strike tag
1 parent 9a68512 commit 0ada6ac

File tree

9 files changed

+83
-11
lines changed

9 files changed

+83
-11
lines changed

api/kotlinx-html.api

Lines changed: 49 additions & 8 deletions
Large diffs are not rendered by default.

buildSrc/src/main/kotlin/kotlinx/html/generate/humanizer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fun humanizeJoin(parts: Iterable<String>, separator: String): String {
5353
filteredParts.add(cutPart)
5454
}
5555

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

5959
private fun String.replaceMistakesAndUglyWords() : String =

buildSrc/src/main/resources/html_5.xsd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@
317317

318318
<xsd:element ref="var"/>
319319
<xsd:element ref="video"/>
320+
<xsd:element ref="s"/>
320321

321322
</xsd:choice>
322323
</xsd:group>
@@ -842,6 +843,7 @@
842843
<xsd:element name="main" type="simplePhrasingContentElement"/>
843844
<xsd:element name="mark" type="simplePhrasingContentElement"/>
844845
<xsd:element name="math" type="simplePhrasingContentElement"/>
846+
<xsd:element name="s" type="simplePhrasingContentElement"/>
845847

846848
<xsd:element name="progress">
847849
<xsd:complexType mixed="true">

buildSrc/src/main/resources/htmltable.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@
545545
/>
546546
<tag name = "samp"
547547
helpref = "struct/text.html#edef-SAMP"
548-
description = "strike-through text style"
548+
description = "computer output text style"
549549
startTag = "true"
550550
endTag = "true"
551551
empty = "false"

src/commonMain/kotlin/generated/gen-consumer-tags.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,12 @@ inline fun <T, C : TagConsumer<T>> C.ruby(classes : String? = null, crossinline
530530
* Strike-through text style
531531
*/
532532
@HtmlTagMarker
533+
inline fun <T, C : TagConsumer<T>> C.s(classes : String? = null, crossinline block : S.() -> Unit = {}) : T = S(attributesMapOf("class", classes), this).visitAndFinalize(this, block)
534+
535+
/**
536+
* Computer output text style
537+
*/
538+
@HtmlTagMarker
533539
inline fun <T, C : TagConsumer<T>> C.samp(classes : String? = null, crossinline block : SAMP.() -> Unit = {}) : T = SAMP(attributesMapOf("class", classes), this).visitAndFinalize(this, block)
534540

535541
@Deprecated("This tag doesn't support content or requires unsafe (try unsafe {})")

src/commonMain/kotlin/generated/gen-tag-groups.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ inline fun FlowContent.u(classes : String? = null, crossinline block : U.() -> U
154154
@HtmlTagMarker
155155
inline fun FlowContent.ul(classes : String? = null, crossinline block : UL.() -> Unit = {}) : Unit = UL(attributesMapOf("class", classes), consumer).visit(block)
156156

157+
/**
158+
* Strike-through text style
159+
*/
160+
@HtmlTagMarker
161+
inline fun FlowContent.s(classes : String? = null, crossinline block : S.() -> Unit = {}) : Unit = S(attributesMapOf("class", classes), consumer).visit(block)
162+
157163
/**
158164
* Document base URI
159165
*/

src/commonMain/kotlin/generated/gen-tag-unions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ inline fun FlowOrPhrasingContent.q(classes : String? = null, crossinline block :
299299
inline fun FlowOrPhrasingContent.ruby(classes : String? = null, crossinline block : RUBY.() -> Unit = {}) : Unit = RUBY(attributesMapOf("class", classes), consumer).visit(block)
300300

301301
/**
302-
* Strike-through text style
302+
* Computer output text style
303303
*/
304304
@HtmlTagMarker
305305
inline fun FlowOrPhrasingContent.samp(classes : String? = null, crossinline block : SAMP.() -> Unit = {}) : Unit = SAMP(attributesMapOf("class", classes), consumer).visit(block)

src/commonMain/kotlin/generated/gen-tags-s.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ import kotlinx.html.attributes.*
99
This file was generated by module generate
1010
*******************************************************************************/
1111

12+
@Suppress("unused")
13+
open class S(initialAttributes : Map<String, String>, override val consumer : TagConsumer<*>) : HTMLTag("s", consumer, initialAttributes, null, false, false), HtmlBlockInlineTag {
14+
15+
}
16+
val S.asFlowContent : FlowContent
17+
get() = this
18+
19+
val S.asPhrasingContent : PhrasingContent
20+
get() = this
21+
22+
1223
@Suppress("unused")
1324
open class SAMP(initialAttributes : Map<String, String>, override val consumer : TagConsumer<*>) : HTMLTag("samp", consumer, initialAttributes, null, true, false), HtmlBlockInlineTag {
1425

src/jsMain/kotlin/generated/gen-consumer-tags-js.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,12 @@ public inline fun TagConsumer<HTMLElement>.ruby(classes : String? = null, crossi
531531
* Strike-through text style
532532
*/
533533
@HtmlTagMarker
534+
public inline fun TagConsumer<HTMLElement>.s(classes : String? = null, crossinline block : S.() -> Unit = {}) : HTMLElement = S(attributesMapOf("class", classes), this).visitAndFinalize(this, block)
535+
536+
/**
537+
* Computer output text style
538+
*/
539+
@HtmlTagMarker
534540
public inline fun TagConsumer<HTMLElement>.samp(classes : String? = null, crossinline block : SAMP.() -> Unit = {}) : HTMLElement = SAMP(attributesMapOf("class", classes), this).visitAndFinalize(this, block)
535541

536542
@Deprecated("This tag doesn't support content or requires unsafe (try unsafe {})")

0 commit comments

Comments
 (0)