Skip to content

Commit

Permalink
Fixing typo in area attribute (#271)
Browse files Browse the repository at this point in the history
* Fixing typo in area attribute

* Updating gen-attributes.kt
  • Loading branch information
severn-everett authored May 15, 2024
1 parent 6524fa8 commit 9781b1d
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/resources/html_5.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,7 @@
<xsd:element name="area">
<xsd:complexType>
<xsd:attributeGroup ref="commonAttributeGroup"/>
<xsd:attribute name="Shape" default="rect">
<xsd:attribute name="shape" default="rect">
<xsd:simpleType>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="rect"/>
Expand Down
2 changes: 2 additions & 0 deletions src/commonMain/kotlin/generated/gen-attributes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ internal val attributeBooleanTicker : Attribute<Boolean> = TickerAttribute()

internal val attributeAReferrerPolicyEnumAReferrerPolicyValues : Attribute<AReferrerPolicy> = EnumAttribute(aReferrerPolicyValues)

internal val attributeAreaShapeEnumAreaShapeValues : Attribute<AreaShape> = EnumAttribute(areaShapeValues)

internal val attributeButtonFormEncTypeEnumButtonFormEncTypeValues : Attribute<ButtonFormEncType> = EnumAttribute(buttonFormEncTypeValues)

internal val attributeButtonFormMethodEnumButtonFormMethodValues : Attribute<ButtonFormMethod> = EnumAttribute(buttonFormMethodValues)
Expand Down
2 changes: 1 addition & 1 deletion src/commonMain/kotlin/generated/gen-consumer-tags.kt
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public inline fun <T, C : TagConsumer<T>> C.area(
crossinline block: AREA.() -> Unit = {},
): T {
contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) }
return AREA(attributesMapOf("Shape", shape?.enumEncode(),"alt", alt,"class", classes), this)
return AREA(attributesMapOf("shape", shape?.enumEncode(),"alt", alt,"class", classes), this)
.visitAndFinalize(this, block)
}

Expand Down
10 changes: 5 additions & 5 deletions src/commonMain/kotlin/generated/gen-tag-unions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -312,31 +312,31 @@ inline fun FlowOrPhrasingContent.abbr(classes : String? = null, crossinline bloc
@OptIn(ExperimentalContracts::class)
inline fun FlowOrPhrasingContent.area(shape : AreaShape? = null, alt : String? = null, classes : String? = null, crossinline block : AREA.() -> Unit = {}) : Unit {
contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) }
AREA(attributesMapOf("Shape", shape?.enumEncode(),"alt", alt,"class", classes), consumer).visit(block)
AREA(attributesMapOf("shape", shape?.enumEncode(),"alt", alt,"class", classes), consumer).visit(block)
}
@HtmlTagMarker
@OptIn(ExperimentalContracts::class)
inline fun FlowOrPhrasingContent.rectArea(alt : String? = null, classes : String? = null, crossinline block : AREA.() -> Unit = {}) : Unit {
contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) }
AREA(attributesMapOf("Shape", AreaShape.rect.realValue,"alt", alt,"class", classes), consumer).visit(block)
AREA(attributesMapOf("shape", AreaShape.rect.realValue,"alt", alt,"class", classes), consumer).visit(block)
}
@HtmlTagMarker
@OptIn(ExperimentalContracts::class)
inline fun FlowOrPhrasingContent.circleArea(alt : String? = null, classes : String? = null, crossinline block : AREA.() -> Unit = {}) : Unit {
contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) }
AREA(attributesMapOf("Shape", AreaShape.circle.realValue,"alt", alt,"class", classes), consumer).visit(block)
AREA(attributesMapOf("shape", AreaShape.circle.realValue,"alt", alt,"class", classes), consumer).visit(block)
}
@HtmlTagMarker
@OptIn(ExperimentalContracts::class)
inline fun FlowOrPhrasingContent.polyArea(alt : String? = null, classes : String? = null, crossinline block : AREA.() -> Unit = {}) : Unit {
contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) }
AREA(attributesMapOf("Shape", AreaShape.poly.realValue,"alt", alt,"class", classes), consumer).visit(block)
AREA(attributesMapOf("shape", AreaShape.poly.realValue,"alt", alt,"class", classes), consumer).visit(block)
}
@HtmlTagMarker
@OptIn(ExperimentalContracts::class)
inline fun FlowOrPhrasingContent.defaultArea(alt : String? = null, classes : String? = null, crossinline block : AREA.() -> Unit = {}) : Unit {
contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) }
AREA(attributesMapOf("Shape", AreaShape.default.realValue,"alt", alt,"class", classes), consumer).visit(block)
AREA(attributesMapOf("shape", AreaShape.default.realValue,"alt", alt,"class", classes), consumer).visit(block)
}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/commonMain/kotlin/generated/gen-tags-a.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ open class ADDRESS(initialAttributes : Map<String, String>, override val consume

@Suppress("unused")
open class AREA(initialAttributes : Map<String, String>, override val consumer : TagConsumer<*>) : HTMLTag("area", consumer, initialAttributes, null, true, true), HtmlBlockInlineTag {
var shape : AreaShape
get() = attributeAreaShapeEnumAreaShapeValues.get(this, "shape")
set(newValue) {attributeAreaShapeEnumAreaShapeValues.set(this, "shape", newValue)}

var coords : String
get() = attributeStringString.get(this, "coords")
set(newValue) {attributeStringString.set(this, "coords", newValue)}
Expand Down
2 changes: 1 addition & 1 deletion src/jsMain/kotlin/generated/gen-consumer-tags-js.kt
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public inline fun TagConsumer<HTMLElement>.area(
crossinline block: AREA.() -> Unit = {},
): HTMLAreaElement {
contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) }
return AREA(attributesMapOf("Shape", shape?.enumEncode(),"alt", alt,"class", classes), this)
return AREA(attributesMapOf("shape", shape?.enumEncode(),"alt", alt,"class", classes), this)
.visitAndFinalize(this, block) as HTMLAreaElement
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public inline fun TagConsumer<Element>.area(
crossinline block: AREA.() -> Unit = {},
): HTMLAreaElement {
contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) }
return AREA(attributesMapOf("Shape", shape?.enumEncode(),"alt", alt,"class", classes), this)
return AREA(attributesMapOf("shape", shape?.enumEncode(),"alt", alt,"class", classes), this)
.visitAndFinalize(this, block) as HTMLAreaElement
}

Expand Down

0 comments on commit 9781b1d

Please sign in to comment.